How can I get TC to run query against SQL database?
Hi everyone,
I have a test that I need to ask TC to run a query in SQL database to update some data, but I have no knowledge about database at all. I read about ADO Object and tried to do the same as showing in the example, but I was not sure what the value after ConnectionString was ("Provider=Microsoft.Jet.OLEDB.4.0;" + _"Data Source=C:\Users\Public\Documents\TestComplete 14 Samples\Desktop\Checkpoints\XML\DataGridViewSample\OrdersDB.mdb").
I asked our developer, and I was told that our database connecting string was something like "data source=xxx.xx.xxx.xxx;initial catalog=xxxx;integrated security=true;multipleactiveresultsets=true;app=xxxx", so is this the value I should place after AConnection.ConnectionString = ? I tried so, but I got a runtime error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." Not sure if it was because the connection code I executed was wrong or because the Microsoft Data Access Components was missing, because I tried to install the downloaded file ( v 2.8 SP1), but nothing happens after I double clicked on it.
I am totally lost, can someone please help me to fix this?
Thanks!
Nevermind, I figured out, it should be DBConnection.Execute(Query to run)