Boolean Query1.IsEmptytrue: no records found; false: the query is OK.
也就是在query1.open后加上 if query.recordcount='0' then showmessage('没有纪录') end 是吗?
也可以这样写: begin Query1.close; Query1.SQL.clear; Query1.SQL.Add('select * from yulong where 域名='+'"'+s+'"'); Query1.Open; Query1.first; if Query1.EOF then begin ..... end; end;
false: the query is OK.
if query.recordcount='0' then
showmessage('没有纪录')
end
是吗?
begin
Query1.close;
Query1.SQL.clear;
Query1.SQL.Add('select * from yulong where 域名='+'"'+s+'"');
Query1.Open;
Query1.first;
if Query1.EOF then
begin
.....
end;
end;