我的CRecordset::GetRecordCount函数总返回1,实际上我的记录集里面有很多条记录。如何解决?请给出代码。 谢谢了。
解决方案 »
- 用VC编写一个播放器怎样让显示器不黑屏且不出现屏保?
- 在access里这句sql可以运行,但为什么放在程序中就报错.
- 能对jpg格式图像直接进行操作吗?大侠请指教
- 子窗口的LoadFrame(...)问题,快帮帮忙兄弟们
- 如何将写好的应用程序做成dll文件,并以函数形式供其他程序调用
- VC中怎样用汇编?
- 高分求教,关于在程序中激活ie浏览器的问题(请高手指点)
- dongfa(阿东) 来领分
- 对word2000操作,用VBSCRIPT ,有点问题ff
- 为什么我把其他.h文件放在最前面一行,即在#include "stdafx.h" 的前面,程序编译过不去?
- 紧急!如何在SHBrowseForFolder里加新建文件夹的功能。在线等待
- 请教,我在对话框中的一个下拉采单中其中一采单无法响应一菜单命令到相应函数,请教
{
m_pSet->MoveNext();
}
long count=m_pSet->GetRecordCount();
---------------------
Caution The record count is maintained as a “high water ” — the highest-numbered record yet seen as the user moves through the records. 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. Adding a record via CRecordset:AddNew and Update increases the count; deleting a record via CRecordset::Delete decreases the count.
学习。