Forum Discussion
Without knowledge of what your connection string is or your actual SQL query, not sure anyone can answer that question. The "unspecified error" usually means that an exception was thrown at the ADO object level which is not exposed directly by TestComplete.
If your intention is to create a record set based upon an SQL query, rather than instantiating an ADO.RecordSet object, you can do that with an ADO.CreateADOCommand call and then run the Execute method on the command object. The result of the execute will return a RecordSet. My suspicion of what's causing your error is that you are saying to "Open" the record set using a command object that is already "open"... so the actual error may be something like "connection already open".
TestComplete documentation has several examples of how to use the ADO objects to generate recordsets for interation. Here's one.
https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sources/databases/using-ado-and-bde-objects/ado-createadocommand.html
Related Content
Recent Discussions
- 3 days agoMW_Didata