如何查找记录集的记录数? [英] how to find the record count for a recordset?

查看:109
本文介绍了如何查找记录集的记录数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我需要找到记录集的记录数。



VB6中记录集的RecordCount属性返回-1。



我正在使用ADODB连接。



 Dim i as integer 
i = rs.RecordCount
//我设为-1





我正在执行存储过程。



谢谢&问候



Varun Sareen

解决方案

请阅读我对该问题的评论。



以下是答案: RecordCount属性(ADO) [ ^ ]

MSDN写道:

当ADO无法确定记录数或者提供者或游标类型不支持RecordCount时,该属性返回 -1


Dear All,

I need to find the record count of a recordset.

the RecordCount property of the recordset in VB6 is returning -1.

I am using ADODB connection.

Dim i as integer 
i = rs.RecordCount
//i is set as -1



I am executing a stored procedure.

Thanks & Regards

Varun Sareen

解决方案

Please, read my comment to the question.


Here is an answer: RecordCount Property (ADO)[^]

MSDN wrote:

The property returns -1 when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount.


这篇关于如何查找记录集的记录数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆