如果QUERY.RECORDCOUNT <> 0 表示有记录,反之没有记录

解决方案 »

  1.   

    Indicates the total number of records associated with the dataset.property RecordCount: Integer;DescriptionAs implemented in TDataSet, RecordCount is always -1. Ordinarily an application does not access RecordCount at the TDataSet level. Instead a redeclared and implemented RecordCount property in a descendant class such as TTable is accessed. RecordCount provides a fallback property for derived dataset classes that do not reimplement the property access method.看一下帮助三少 :o)
      

  2.   

    有人说
    读RecordCount之前
    先First
      

  3.   

    也可以
    SELECT COUNT(*) as Cnt FROM xxx
    取Cnt
      

  4.   

    你的查询中包含了数据库的Memo型字段,把Memo字段去掉即可!
    当然此时就不要select * from xxx ...
    而是select code,field2,field3 from xxx ...
      

  5.   

    当然,OLE类型的最好也要去掉!