Can an ADO SQL Select contain a DDT.CurrentDriver.Value
I need to write a qry that uses data driven variables. Is it possible to use DDT.CurrenDriver.value("aValue") in a
Select function? When I try the driver below I get an error: Expected ';'
function CSVDriver()
{
// Creates a driver
DDT.CSVDriver("C:\\someFile\\my_Variables.csv");
// Iterates through records
while (! DDT.CurrentDriver.EOF())
//...
datadrivenQry();
DDT.CurrentDriver.Next();
// Closes the driver
DDT.CloseDriver(DDT.CurrentDriver.Name);
}
function datadrivenQry(){
var Qry;
// Create a query
Qry = ADO.CreateADOQuery();
// Specify the connection string
Qry.ConnectionString = Project.Variables.VariableByName("DBOConnection");
Qry.SQL = "Select top 1 id from MyTable where PD.documentDescriptionType =DDT.CurrentDriver.Value("aValue")
Qry.Open();
// Process results and insert data into the test log
Qry.First();
while (! Qry.EOF)
{
var id = (Qry.FieldByName("id").Value);
Qry.Next();
};
Log.Message(id)
}