若recordcount为0,则一条记录也没有
或者 eof,bof 都 true

解决方案 »

  1.   

    (adoquery.Eof and AdoQuery.BOF)
    (adoQuery.IsEmpty)
      

  2.   

    同意chechy(我爱洁洁) !
      

  3.   

    if(not ADOQuery.IsEmpty) then
      begin
        //如果数据不为空,则执行
      end esle
      begin
        //如果数据为空,则执行 
      end;
      

  4.   

    if Adoquery.recordcount=0 then 无记录;
      

  5.   

    adoquery.Close;
     adoquery.ConnectionString:=database;
     adoquery.sql.Clear;
     sqlstr:='select count(*) from database' ;
     ADOQuery.SQL.Add(sqlstr);
     adoquery.open;
     h:=adoquery.Fields[0].AsInteger;
     if h=0 then
      begin
        无纪录
      end;
      

  6.   

    比较麻烦的方法
    第一个adoquery查出来的select * from table where a=b;
    第二个adoquery查select count(*) from (select select * from table where a=b);
    这个数就是一个记录数
      

  7.   

    if ADOQuery.recordcount=0 then
      数据为空
     esle
      如果数据不为空;