如果不是文件型数据库,recordCount是得不到值的,只有
query1.close;
query1.SQL.text := 'select Count(*) as RCount from table1 where ...'
query1.open;
showmessage(query1.fieldbyname('RCount').asstring);
query1.close;
query1.close;
query1.sql.clear;
query1.SQL.add (select Count(*) as RCount from table1 where ...)
query1.open;
if not query1.eof then
记录数:=query1.recordcout;