2,495
社区成员
发帖
与我相关
我的任务
分享
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add('select * from name1 where Field1=:UserInput');
Parameters.ParamByName('UserInput').Value := Edit1.Text;
Open;
if IsEmpty then
showmessage('NOT FOUND')
else
showmessage('FOUND');
end;
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add(''select * from name1 where Field=:UserInput');
ExecSQL;
end;
if ADOQuery1.RecordCount=0 then
showmessage('NOT FOUND')
else
showmessage('FOUND');