the rowset is not bookmarkable
我想自己封装一个ADO类.
bool CAdo::OpenSqlDB()
{
using namespace ado20; // ADO #import
// UpdateData(TRUE);
//
try
{
strConnectionStr="Provider=SQLOLEDB;Password="+strPwd+",persist Security Info=True;User ID="+strUserName+";Initial Catalog="+strDBName+";Data Source="+strServerName;
if(m_pConnection==NULL)
m_pConnection.CreateInstance(__uuidof(Connection) );
m_pConnection->Open(_bstr_t(strConnectionStr),_bstr_t(strUserName),_bstr_t(strPwd),adModeUnknown);
m_bDataOpened=true;
return true;
}
catch(_com_error e)
{
AfxMessageBox("远程中心数据库连接失败!");
return false;
}
// 查询DemoTable表中所有字段
return true;
}
使用OpenSqlDB后,然后想让使用SQL语句得到ado.m_pSet于DATAGRI网格控件绑定,但是只要运行到m_ctrlGrid.putref_DataSource((LPUNKNOWN)ado.m_pSet);就出现the rowset is not bookmarkable的错误.请高手出手!
问题点数:0、回复次数:1Top
1 楼tcly(人渣)回复于 2003-12-03 13:37:47 得分 0
算了,我自己研究出来了。
就是在打开数据库的之前必须加一句:
m_pConnection->CursorLocation = adUseClient;
Top
相关问题
- the rowset is not bookmarkable这个错误提示是怎么回事
- 在datagrid里显示数据时出现"the rowset is not bookmarkable"是什么意思
- 刚给了200分:操作数据库时,提示The rowset is not bookmarkable,高手指导一下
- 一个ADO问题:关联DataGrid的DataSource老是出现“the rowset id not bookmarkable"?什么原因?
- Failed to open a rowset
- 请问各位,RowSet和ResultSet的区别
- 请问rowset的分页功能
- jFresH_MaN在不?有个关于RowSet的问题
- RowSet这个接口的实现类是由数据库厂商提供的吗?
- 关于系统存储过程"sp_procedure_params_rowset"的一点疑问!




