可以判断
if table.eof and table.bof then showmessage('记录为空');

解决方案 »

  1.   

    也可以判断
    if query.eof and query.bof then showmessage('记录为空'); 
      

  2.   

    老兄,你查询之后, 可以使用TQuery.RecordCount 来进行判断代码如下:
    if Query1.RecordCount > 0 then 
      Application.MessageBox('你的查询无记录','提示',0)
    else
      Application.MessageBox('你的查询有'+IntToStr(Query1.RecordCount)+'条记录','提示',0);
      

  3.   

    if Query1.RecordCount =0 then MessageBox('没有找到符合条件的记录','提示',0)