I am first using your SDAC. I using Migation BDE TO SDAC.
When BDE Query1 Select Command:
with Query1 do
begin
CLose;
SQL.Clear;
SQL.Add('select * from table1 where field1="'+Edit1.Text+'"');
if not Prepared then Prepare;
Open;
end;
But, In SDAC MSQuery, Program run Error
Error Message: inValid Fieldname
I can't change SQL.Add('select * from table1 where field1=:field1') ,
because My program to much, Pleae tell my, How to do.
Thank you
MSQuery Where ?
Hello,
To solve the problem, you should replace double quotes in your query with the pair of single quotes. Here is a code example:
To solve the problem, you should replace double quotes in your query with the pair of single quotes. Here is a code example:
Code: Select all
with Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from table1 where field1='''+Edit1.Text+'''');
if not Prepared then Prepare;
Open;
end;