打印本文 打印本文 关闭窗口 关闭窗口
ADO访问Oracle结果集的心得
作者:武汉SEO闵涛  文章来源:敏韬网  点击数5582  更新时间:2009/4/23 10:36:08  文章录入:mintao  责任编辑:mintao
bsp;描述 : %s \n",(LPCSTR)bstrSource,(LPCSTR)bstrDescription);
    }

    if (pRs)
        if (pRs->State == adStateOpen)
            pRs->Close();

    if (pConnection)
        if (pConnection->State == adStateOpen)
            pConnection->Close();
}


/**////////////////////////////////////////////////////////////
//                                                       //
//      PrintProviderError Function                      //
//                                                       //
/**////////////////////////////////////////////////////////////

VOID PrintProviderError(_ConnectionPtr pConnection)
{
    // Print Provider Errors from Connection object.
    // pErr is a record object in the Connection''''s Error collection.
    ErrorPtr    pErr = NULL;
    long        nCount = 0;    
    long        i = 0;

    if( (pConnection->Errors->Count) > 0)
    {
        nCount = pConnection->Errors->Count;
        // Collection ranges from 0 to nCount -1.
        for(i = 0; i < nCount; i++)
        {
            pErr = pConnection->Errors->GetItem(i);
            printf("Error number: %x\n Error Description: %s\n", pErr->Number,(LPCSTR) pErr->Description);
        }
    }
}

再试,得到异常:

输入: 0
Error number: 80040e14
 

上一页  [1] [2] [3] [4] [5]  下一页

打印本文 打印本文 关闭窗口 关闭窗口