Insert into b (id,name) values(pno,pname)运行错误
procedure TForm1.Button1Click(Sender: TObject);
var
pno,pname:string;
begin
self.ADOQuery1.Close;
pno:= edit1.Text;
pname:= edit2.Text;
self.ADOQuery1.SQL.Clear;
self.ADOQuery1.SQL.Add('Insert into b (id,name) values(pno,pname)');
self.ADOQuery1.Open;
end;
编译通过,运行错误
错误提示:在此上下文中不允许使用PNO,此处只允许使用变量,表达式或常量,
不允许使用列名
请问要怎样修改