Subject | SQL add? |
---|---|
Author | Daniel Bertin |
Post date | 2002-04-05T20:42:04Z |
Hi all,
Why can I not execute this query? I get unknown table name error. but if I
replace the params with the values it's ok. what am I missing?
StrTable := 'ManuFact';
NAME := 'MANNAME';
begin
with QRYT do
begin
Close;
Parambyname('TABLE').asString := StrTable;
ParamByName('NAME').asstring := NAME;
SQL.Clear;
SQL.Add('SELECT * FROM :TABLE');
SQL.Add('ORDER BY :NAME');
Open;
end;
Thanks
Daniel
Why can I not execute this query? I get unknown table name error. but if I
replace the params with the values it's ok. what am I missing?
StrTable := 'ManuFact';
NAME := 'MANNAME';
begin
with QRYT do
begin
Close;
Parambyname('TABLE').asString := StrTable;
ParamByName('NAME').asstring := NAME;
SQL.Clear;
SQL.Add('SELECT * FROM :TABLE');
SQL.Add('ORDER BY :NAME');
Open;
end;
Thanks
Daniel