出现了如下异常谁为什么?
ORAN8! 60b4dbfe()
ORAN8! 60b4dab8()
ORAN8! 60b15ec9()
ORAN8! 60b61c7c()
ORACLIENT8! 60429b1e()
ORACLIENT8! 604b4695()
ORACLIENT8! 604b9ece()
ORACLIENT8! 604b9f1a()
ORACLIENT8! 604bbbfd()
ORACLIENT8! 604bcc68()
ORACLIENT8! 60482944()
ORACLIENT8! 604698a0()
OCIW32! 02221e7c()
MSDAORA! 1f58e0ee()
MSDAORA! 1f58ec00()
MSVCRT! 77c07fb8()
KERNEL32! 77e5d33b()
怎么才能捕获它?catch(_com_error &e)
好像不行,我已经给他处理了。
可还是出现了。这种状况很少见可让我碰到了。
ORAN8! 60b4dbfe()
ORAN8! 60b4dab8()
ORAN8! 60b15ec9()
ORAN8! 60b61c7c()
ORACLIENT8! 60429b1e()
ORACLIENT8! 604b4695()
ORACLIENT8! 604b9ece()
ORACLIENT8! 604b9f1a()
ORACLIENT8! 604bbbfd()
ORACLIENT8! 604bcc68()
ORACLIENT8! 60482944()
ORACLIENT8! 604698a0()
OCIW32! 02221e7c()
MSDAORA! 1f58e0ee()
MSDAORA! 1f58ec00()
MSVCRT! 77c07fb8()
KERNEL32! 77e5d33b()
怎么才能捕获它?catch(_com_error &e)
好像不行,我已经给他处理了。
可还是出现了。这种状况很少见可让我碰到了。
_bstr_t add;
CString ErrorMessage,temp;for (short i=0;i<errorcount;i++)
{
add = pConnection->GetErrors()->GetItem(_variant_t((short)i))->GetDescription();
temp = (char *)add;
ErrorMessage += temp;
}
AfxMessageBox(ErrorMessage);//详细的错误信息
我连的是ORACLE9i。
他在报ORACLE8的错!还是内部错误.
http://community.csdn.net/Expert/topic/2971/2971645.xml?temp=.8124353
HRESULT LogAdoErrorImport(_ConnectionPtr pConn,LPSTR perr)
{
ErrorsPtr pErrors;
ErrorPtr pError;
CString strTmp;
HRESULT hr = (HRESULT) 0L;
long nCount; // Don't have an un-handled exception in the handler that
// handles exceptions!
try
{
pErrors = pConn->GetErrors(); nCount = pErrors->GetCount();
LPSTR err = perr;
for( long i = 0; (!FAILED(hr)) && (i < nCount); i++ )
{
TRACE( "\t Dumping ADO Error %d of %d", i+1, nCount ); hr = pErrors->get_Item((_variant_t)((long)i), &pError ); _bstr_t bstrSource ( pError->GetSource() );
_bstr_t bstrDescription( pError->GetDescription() );
_bstr_t bstrHelpFile ( pError->GetHelpFile() );
_bstr_t bstrSQLState ( pError->GetSQLState() ); sprintf( err,"\n Number = %ld", pError->GetNumber() );
err = strchr(err,0);
sprintf( err, "\n Source = %s", (LPCTSTR) bstrSource );
err = strchr(err,0);
sprintf( err,"\n Description = %s", (LPCTSTR) bstrDescription );
err = strchr(err,0);
sprintf( err, "\n HelpFile = %s", (LPCTSTR) bstrHelpFile );
err = strchr(err,0);
sprintf( err, "\n HelpContext = %ld", pError->GetHelpContext() );
err = strchr(err,0);
sprintf( err, "\n SQLState = %s", (LPCTSTR) bstrSQLState );
err = strchr(err,0);
sprintf( err, "\n HelpContext = %ld", pError->GetHelpContext() );
err = strchr(err,0);
sprintf( err, "\n NativeError = %ld", pError->GetNativeError() );
err = strchr(err,0);
}
}
catch( CException *e )
{
TRACE( "*** UNABLE TO LOG EXCEPTION ***" );
e->Delete();
}
catch(...)
{
TRACE( "*** UNABLE TO LOG EXCEPTION ***" );
}
if( pErrors )
pErrors->Release();
if( pError )
pError->Release(); return hr;
}
只要在到数据库的连接中断的时候
就有可能发生,
属于ADO的内部错误。