I'm creating runtime SQL for a query object. Simply...
SELECT *
FROM tablename
WHERE Fieldname1 = abc
and Fieldname2 = def
passing the following hardcoded value works fine
SQL.Add(' and FieldName2 = ' + '''T7379788''');
how would I pass a variable to the sql structure - along the lines of... ?
SQL.Add(' and FieldName2 = ' + strSerialNumber);
Cheers
SELECT *
FROM tablename
WHERE Fieldname1 = abc
and Fieldname2 = def
passing the following hardcoded value works fine
SQL.Add(' and FieldName2 = ' + '''T7379788''');
how would I pass a variable to the sql structure - along the lines of... ?
SQL.Add(' and FieldName2 = ' + strSerialNumber);
Cheers