L
lafaer
Unregistered / Unconfirmed
GUEST, unregistred user!
程序如下:
procedure TForm1.Button1Click(Sender: TObject);
VAR
str:string;
begin
Form1.ADOQuery1.Close;
str:='insert into sales(qty) valuesqty)';
Form1.ADOQuery1.Parameters.ParamValues['qty']:=strtoint(Edit2.text);
Form1.Adoquery1.sql.clear;
Form1.ADOQuery1.SQL.Add(str);
try
Form1.ADOQuery1.Open;
except
Form1.ADOQuery1.ExecSQL;
end;
end;
运行通过,当我在edit2中打入数字后。单击button1
却报出:Adoquery1arameters 'qty' not found
谁能告知。
procedure TForm1.Button1Click(Sender: TObject);
VAR
str:string;
begin
Form1.ADOQuery1.Close;
str:='insert into sales(qty) valuesqty)';
Form1.ADOQuery1.Parameters.ParamValues['qty']:=strtoint(Edit2.text);
Form1.Adoquery1.sql.clear;
Form1.ADOQuery1.SQL.Add(str);
try
Form1.ADOQuery1.Open;
except
Form1.ADOQuery1.ExecSQL;
end;
end;
运行通过,当我在edit2中打入数字后。单击button1
却报出:Adoquery1arameters 'qty' not found
谁能告知。