第1个回答 2006-08-14
使用ADO对象的RecordSet对象的count属性
例如
a=ado1.recordset.count
a的值就是ADO1所链接的数据表中记录个数
同样还可以使用count来获取字段个数
f=ado1.recordset.fields.count
第2个回答 2019-11-24
第一:写SQL:"select
count(*)
as
tcount
from
表"
第一:使用recordset,connection查询
第三:text1.text=recordset.fields("tcount").value
第3个回答 2006-08-14
针对楼上 a=ado1.recordset.count 这样写很危险,因为有时a = -1 ,我的建议是这样写
dim rs as new adodb.recordset
rs.open "select count(*) from 表名",con,3,2
rs.fields(0).value就是你所要的值本回答被提问者采纳
第4个回答 2006-08-14
记录 RecordSet 有 Count 属性,应该是 GetCount()