Hi,
Quotes can't be used in SQL, for example
SELECT FIELD1,FIELD2 FROM TABLE TABLE1 WHERE FIELD1''
works but
SELECT FIELD1,FIELD2 FROM TABLE TABLE1 WHERE FIELD1""
does not.
Using quotes is required when creating SQL in code.
qryX.SQL.Add('SELECT FIELD1,FIELD2 FROM TABLE TABLE1 WHERE FIELD1"" ');
Using Turbo Delphi, IBDAC 2.0.0.6
Quotes
This is not an IBDAC issue. InterBase interprets '' (two single quotes) as an empty value. When you use double quotes as quotation symbol, InterBase interprets it as an identifier name (e.g. table name, field name) in your case it tries to find an empty identifier.
As specified in Delphi/Pascal manual you should double single quotation symbol to include it in the string.
E.g.
As specified in Delphi/Pascal manual you should double single quotation symbol to include it in the string.
E.g.
Code: Select all
qryX.SQL.Add('SELECT FIELD1,FIELD2 FROM TABLE TABLE1 WHERE FIELD1'''' '); //<< four ' symbols