_ConnectionPtr myconn;
_RecordsetPtr myrecord;
CString conn;
myconn.CreateInstance(__uuidof(Connection));
myrecord.CreateInstance(__uuidof(Recordset));
myrecord->CursorLocation= adUseClient; 
myconn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\store\\store.mdb;Persist Security Info=False;Jet OLEDB:Database Password=cc","","",adModeUnknown);
myrecord = myconn->Execute("select * from useradmin",NULL,adCmdText);
m_datagrid.SetRefDataSource(myrecord);
请问上面的代码哪里出错了?为什么每次运行到m_datagrid.SetRefDataSource(myrecord)这里,就出现the rowset is not bookable的错误?
上网查了一下,说是游标没设,可是我已经加上myrecord->CursorLocation= adUseClient了,可还是出现这样的错误