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.