GAutomation
6 years agoFrequent Contributor
dynamically run the DB query in keyword driven framework
I am trying to pass the sql stament in the excel. But getting "wrong number of arguments or invalid property assignment"
Correct... because there is no "Item" sub-property off of the field by name.
If you're going to loop via the index, then you should use
Qry1.FieldByNumber(i).Value
note:
In the following help file for the CreateADOQuery method (https://support.smartbear.com/testcomplete/docs/reference/program-objects/ado/createadoquery.html) there is a link to the wiki for the Delphi ADO component objects which contains information for all fields and methods for the various objects. This is going to be your resource for any objects that return the Delphi VCL ADO objects.