Is it possible to run a simply sql query such as-
SELECT * FROM —table name—
From within TestComplete and have it return my results? I’m having challenges getting my keyword tests to recognize my query window in SQL Server Mgmt Studio.
Thank you.
Is it possible to run a simply sql query such as-
SELECT * FROM —table name—
From within TestComplete and have it return my results? I’m having challenges getting my keyword tests to recognize my query window in SQL Server Mgmt Studio.
Thank you.
Yes you can, using the ADO Object.
Yes—skip trying to automate the SSMS query window. In TestComplete, create a script unit (VBScript or JScript), instantiate the ADO COM objects, open a connection to the database with your connection string, run the SELECT through a command or recordset, then read the returned Fields. Close the recordset and connection when done. You can call that script routine from a keyword test. Keep credentials out of the test code; use a config file or integrated security where possible.