What's up everyone? I have a program I'm writing and it accesses a database. I access it the same way in a few different classes. Here's the code...
The problem is, I keep getting an exception... and it goes into the catch(...) statement... How can I tell what the error is?
Code:
BOOL CContributionInfo::ConnectToDatabase()
{
BOOL bRet = TRUE;
try
{
m_db.Open( _T( "SAFARI" ),
FALSE,
FALSE,
_T( "ODBC;UID=copeland;PWD=cope3x" ),
TRUE );
}
catch(CDBException &e)
{
char szErr[ERR_LEN];
memset(szErr, 0 , ERR_LEN);
e.GetErrorMessage(szErr, ERR_LEN-1);
AfxMessageBox(szErr);
bRet = FALSE;
}
catch(...)
{
bRet = FALSE;
}
return bRet;
}
The problem is, I keep getting an exception... and it goes into the catch(...) statement... How can I tell what the error is?