C
ckylixj
Unregistered / Unconfirmed
GUEST, unregistred user!
各位高手,我遇到一个奇怪的问题。有以下代码。
DataModule2.Query1.Active :=false;
DataModule2.Query1.SQL.Clear ;
s:='delete from :table';
DataModule2.Query1.SQL.Add(s);
if FlatCheckBox1.Checked then
begin
DataModule2.Query1.Active :=false;
DataModule2.Query1.ParamByName('table').AsString:='xiecha';
DataModule2.Query1.Active :=True;
DataModule2.Query1.ExecSQL ;
end;
if FlatCheckBox2.Checked then
begin
DataModule2.Query1.Active :=false;
DataModule2.Query1.ParamByName('table').AsString:='dkl';
DataModule2.Query1.Active :=True;
DataModule2.Query1.ExecSQL ;
end;
每次运行均报错,错误提示如下:
Project roject1.exe raised exception class EDBEngineError with
message 'Invalid use of keyword.
Token: from
Line Number: 1'.Process stopped. Use Step or Run to continue.
望各位大侠对在下指点一二。
DataModule2.Query1.Active :=false;
DataModule2.Query1.SQL.Clear ;
s:='delete from :table';
DataModule2.Query1.SQL.Add(s);
if FlatCheckBox1.Checked then
begin
DataModule2.Query1.Active :=false;
DataModule2.Query1.ParamByName('table').AsString:='xiecha';
DataModule2.Query1.Active :=True;
DataModule2.Query1.ExecSQL ;
end;
if FlatCheckBox2.Checked then
begin
DataModule2.Query1.Active :=false;
DataModule2.Query1.ParamByName('table').AsString:='dkl';
DataModule2.Query1.Active :=True;
DataModule2.Query1.ExecSQL ;
end;
每次运行均报错,错误提示如下:
Project roject1.exe raised exception class EDBEngineError with
message 'Invalid use of keyword.
Token: from
Line Number: 1'.Process stopped. Use Step or Run to continue.
望各位大侠对在下指点一二。