with adoquery1 do
begin
close;
sql.Clear;
sql.Add('select * from 表名 where 字段名 is not null');
open;
end;
if ADOQuery1.RecordCount>0 then
begin
showmessage('查詢成功');
end
else
showmessage('查詢失敗');
end;
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('select 语句');
try
execsql;
showmessage('查詢成功');//查询成功!!!!
except
showmessage('查詢失败);
end;
if recordsetcount=0 then//没有记录
begin
....
end;
end;