GAutomation
6 years agoFrequent Contributor
how to run the update statement in test complete
VB script
Function Sq_QryUdate(field,value )
'Create a query
Set Qry1 = ADO.CreateADOConnection
'Specify the connection string
Qry1.ConnectionString = "Provider=IBMDA400.DataSource.1;Persist Security Info=False;User ID=XXX;Password=XXX;Data Source=XXX"
Qry1.Open()
'Specify the SQL expression
Qry1.Execute="Update statement"
Qry1.Close()
The above does not work as expected.
Got it worked. I went to database checkpoint and try connecting and ran teh code again without any changes it worked. not sure what the issue was. but its working.