用记录集指针的PutCollect函数时出错!
HRESULT hr;
try
{
hr=m_recordset->Open("select * from Popedom",
DataBaseSource,adOpenKeyset,adLockOptimistic,adCmdText);
if(SUCCEEDED(hr))
{
m_recordset->PutCollect("ApplyPopedom","1");
m_recordset->Close();
}
else
AfxMessageBox("读数据库出错,请检查表Popedom是否丢失!");
}
catch(_com_error &e)
{
MessageBox((char*)e.Description(),"写数据库错误!",MB_ICONERROR | MB_OK);
}
提示说:在此环境中不允许操作!
我发现是m_recordset->PutCollect("ApplyPopedom","1");这一句引起的,请问为什么?