rs->GetRecordCount()
-->The total number of records is only known after the user has moved beyond the last record. For performance reasons, the count is not updated when you call MoveLast. To count the records yourself, call MoveNext repeatedly until IsEOF returns nonzero. (MSDN)
-->The total number of records is only known after the user has moved beyond the last record. For performance reasons, the count is not updated when you call MoveLast. To count the records yourself, call MoveNext repeatedly until IsEOF returns nonzero. (MSDN)
解决方案 »
- IO完成端口小问题
- fd_isset显示有数据可读,但是recv的数据为零
- 对话框怎样默认最大话。
- 如何增大自动生成菜单中菜单项的字体
- 请问高手,有关bmp
- 谁知道用VC讲解的ADO技术书。 纸版或电子版都行!
- 怎么使用SendMessage的方式调用CListBox中的InsertString函数?谢谢!
- 谁有 中文词自动切分 的控件,非常需要,谢谢
- 请问如何屏蔽Page Up键?
- 谁能帮我测试一下软件,主要是因为Dll问题。
- 租房,急!!!!!!哪位程序员有或者合租都行,中介也可商量!!!!!!程序员们帮帮忙!!!!!!给分!!!!!!!!!!!!!!!请斑竹千万不要删除,帮帮忙,我很着
- 高分请教:如何创建一个与设备无关的Bitmap?
返回的记录集GetRecordCount()的返回值是对的
在这种情况下你得不到记录总数
我想在执行存储过程后返回光标(Cursor)可以自由移动的记录集,
可是现在返回的记录集只能调用MoveFirst和MoveNext,调用MoveLast即出现
异常(因为记录集的Cursor类型为adOpenForwardOnly)。请问应该怎么办?
设定客户端游标
_RecordsetPtr pRs->CursorLocation=adUseClient;open时候采用参数adOpenKeyset
pRs->Open( SQL,
_variant_t((IDispatch *)pConn,true),
adOpenKeyset,
adLockReadOnly,
-1 ); 这时候 返回的记录集GetRecordCount()的返回值就是对的
dynamic,此时recordCount就是为-1,设置为readonly就可以
使用得到正确的结果