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');
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;
adoquery1.sql.Add('select name from name1 where name=''+Edit1.Text+''')IsEmpty 提示
. . . open; If RecordCount > 0 Then showmessage('NO ') else showmessage('YES')
提问笼统回答也只好如此
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');
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;
.
.
open;
If RecordCount > 0 Then
showmessage('NO ')
else
showmessage('YES')