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] 下一页 |