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)
有人说 读RecordCount之前 先First
也可以 SELECT COUNT(*) as Cnt FROM xxx 取Cnt
你的查询中包含了数据库的Memo型字段,把Memo字段去掉即可! 当然此时就不要select * from xxx ... 而是select code,field2,field3 from xxx ...
读RecordCount之前
先First
SELECT COUNT(*) as Cnt FROM xxx
取Cnt
当然此时就不要select * from xxx ...
而是select code,field2,field3 from xxx ...