TAHbKA
11 years agoOccasional Contributor
Qry.First() remains undefined
Am trying to run a code which is pretty much similar to your example here http://support.smartbear.com/viewarticle/30926/ My connection seems to be fine, when am looking in a debugger on the QRY object after QRY.Open() it shows recordcount 2, fieldcount 7, which is correct. I was also able to create a DBTables object, so assume my connection and the query are fine.
However, the QRY.First() remains undefined for some reason. It worked fine in the previous Testcomplete version. This is my code function
QeryTry()
{
var Qry;
Qry = ADO.CreateADOQuery();
Qry.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=;Data Source="
Qry.SQL = "select * from "; // Execute the query
Qry.Open();
Qry.First();
var result = (Qry.FieldByName("".Value)); Log.Message("Found " + result);
return result;
}
this is the result Field '' not found Error location: Unit: "" Line: 687 Column: 5. What am I missing? Thanks!
However, the QRY.First() remains undefined for some reason. It worked fine in the previous Testcomplete version. This is my code function
QeryTry()
{
var Qry;
Qry = ADO.CreateADOQuery();
Qry.ConnectionString = "Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=;Data Source="
Qry.SQL = "select * from "; // Execute the query
Qry.Open();
Qry.First();
var result = (Qry.FieldByName("".Value)); Log.Message("Found " + result);
return result;
}
this is the result Field '' not found Error location: Unit: "