Other HPE Product Questions
1828149 Members
2668 Online
109975 Solutions
New Discussion

Re: Error coming in running sql query

 
DIPS1
New Member

Error coming in running sql query

Hi,
Iam trying to update a value from sql DB but is giving error. Please let me know what protocol to use ?
Iam using webservices protocol.

lr_db_connect("StepName=myStep",
"ConnectionString=Initial Catalog=DBName;Data Source=Servername;user id =sa ;password = sa" ,
"ConnectionName=MyConnection",
"ConnectionType=SQL",
LAST);

lr_db_executeSQLStatement("StepName=UpdateStep",
"ConnectionName=MyConnection",
"SQLQuery=update employee set name = 'test user' where empid = 1",
"DatasetName=ds1",
LAST);

lr_db_disconnect ("StepName=Closestep",
"ConnectionName=MyConnection",
LAST);

It is giving error:
Error: The "SQLQuery=update employee set name = 'test user' where empid = 1" argument (#3) is invalid or not recognized at this position in the function call

Kindly help

Thanks
Dips

1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: Error coming in running sql query

This is the wrong forum (and in the future the wrong company) for software questions.
https://community.saas.hpe.com/t5/LoadRunner-Practitioners-Forum/bd-p/sws-LoadRunner_SF