sriram_sig
6 years agoContributor
Solved
Getting error while trying to retrieve value from db using ADO.CreateCommand()
I'm trying to execute the below code , but for some reason i'm getting errors which i'm unable to solve
AConnection = General.GetConnection()
ADOCommand = ADO.CreateCommand()
ADOCommand.ActiveConne...
- 6 years ago
In General.GetConnection, change it from CreateADOConnection to just CreateConnection. The two methods return two different object types.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/ado/createconnection.htmlThe ActiveConnection property of the ADO.CreateConnectionis a Microsft ADO connection object while the ADO.CreateADOConnection is an IAQAADOConnection object. Since you're using ADO.CreateCommand which ALSO creates a Microsoft object (as opposed to a Borland VCL object), you should use the method that matches.