用的是ACCESS,在MOVENEXT的时候抛出了unknown error Ox800A0BCD
代码如下:
_variant_t strName; if (!m_pRs->BOF)
{
try
{
m_pRs->MoveFirst();
}
catch(_com_error& e)
{
AfxMessageBox(e.ErrorMessage());
}
} strName = m_pRs->GetCollect("name"); while(sPath != strName.bstrVal)
{
try
{
m_pRs->MoveNext();
}
catch(_com_error& e)
{
AfxMessageBox(e.ErrorMessage());
}
if (m_pRs->adoEOF)
{
return FALSE;
}
strName = m_pRs->GetCollect("name");
}
为啥会造成这个原因的?求帮组

解决方案 »

  1.   

    我去。。我解决了。。在用到MOVE函数之前一定要对时候超出记录集做判断。
      

  2.   

    还是不对。。各位在帮我看下把。。现在在MOVE函数之前都加了if(!pRs->adoEOF)
      

  3.   

    加异常捕获看是什么错误
    try
    {
    //你的ADO代码
    }
    catch (_com_error& e)
    {
    CString strMsg;
    strMsg.Format(_T("错误描述:%s\n错误消息%s", 
    (LPCTSTR)e.Description(),
    (LPCTSTR)e.ErrorMessage());
    AfxMessageBox(strMsg);
    }
      

  4.   

    没有任何用处,在GetCollec函数这里要么说出现_com_error但是没有捕捉到,要么就在那句话突然卡主了。
      

  5.   

    你好,请问你知道如何关闭ACCESS的读权限么。。