-
Errors in MFC apps
When I make an MFC application and something goes wrong during run time the app will often throw up an error that I didnt write, and doesnt appear anywhere in the source or string tables. There is one 'error' that I would like to remove completely. I am making a frontend for a (huge) database, but on running the program I get 'too many fields defined' error.
I would like to change the maximum limit or remove this error completely, as susrely the amount of maximum fields should depend on free resources etc, and is not constant.
-
Through further research I've found this is an error specific to access databases with more than 255 fields. Still if anyone knows how to remove this limit I'd appreciate it.
-
dao errors
trap the error and look at the help files indicated for the error
Code:
try{
....dao operations here
}
catch( CDaoException* e )
{
int iErrorCount = e->GetErrorCount();
CString sMsg;
CString sFullMsg;
for( int i = 0; i < iErrorCount; i++
{
e->GetErrorInfo( i );
sMsg.Format("Error code %d\nSource %s\nDescription %s\nHelpFile %s\nHelp Context %d",
e->m_pErrorInfo->m_lErrorCode, e->m_pErrorInfo->m_strSource, e->m_pErrorCode->m_strDescription, ...m_strHelpFile, m_lHelpContext);
sFullMsg += sMsg;
sFullMsg += "\n";
}
MessageBox( sFullMsg );
}
Usually the associated help files jeterr...hlp have some pretty direct causes and I am able to fix my program from there...