Debug Assertion Failed when connecting Access, why?
-
I am developping an Add-in based on a CAD software called Autodesk Inventor. my program connects to the Access Database.following is code:
CDaoDatabase *pDb = new CDaoDatabase();
CString dbfilename = _T("DetailedDesign_97.mdb");
pDb->Open(dbfilename);
AfxMessageBox(_T("db opened"));
pDb->Close();
delete pDb;every thing is ok when I am using the Add-in when the Inventor is running, but when I close the Inventor, an error message box comes out followed by an error to the Autodesk Inventor application. the error message box is like this: ------------------------------ Debug Assertion Failure Program: ...\Inventor.exe file: appcore.cpp line: 377 ........ ------------------------------ what surprises me most is that this error happens only when the add-in is copiled in the debug mode, and release is ok. I have looked up the msdn and find nothing, anybody has any idea? Thank you very much!!! ------------------- I am learning C++ and English
-
I am developping an Add-in based on a CAD software called Autodesk Inventor. my program connects to the Access Database.following is code:
CDaoDatabase *pDb = new CDaoDatabase();
CString dbfilename = _T("DetailedDesign_97.mdb");
pDb->Open(dbfilename);
AfxMessageBox(_T("db opened"));
pDb->Close();
delete pDb;every thing is ok when I am using the Add-in when the Inventor is running, but when I close the Inventor, an error message box comes out followed by an error to the Autodesk Inventor application. the error message box is like this: ------------------------------ Debug Assertion Failure Program: ...\Inventor.exe file: appcore.cpp line: 377 ........ ------------------------------ what surprises me most is that this error happens only when the add-in is copiled in the debug mode, and release is ok. I have looked up the msdn and find nothing, anybody has any idea? Thank you very much!!! ------------------- I am learning C++ and English
-
I am developping an Add-in based on a CAD software called Autodesk Inventor. my program connects to the Access Database.following is code:
CDaoDatabase *pDb = new CDaoDatabase();
CString dbfilename = _T("DetailedDesign_97.mdb");
pDb->Open(dbfilename);
AfxMessageBox(_T("db opened"));
pDb->Close();
delete pDb;every thing is ok when I am using the Add-in when the Inventor is running, but when I close the Inventor, an error message box comes out followed by an error to the Autodesk Inventor application. the error message box is like this: ------------------------------ Debug Assertion Failure Program: ...\Inventor.exe file: appcore.cpp line: 377 ........ ------------------------------ what surprises me most is that this error happens only when the add-in is copiled in the debug mode, and release is ok. I have looked up the msdn and find nothing, anybody has any idea? Thank you very much!!! ------------------- I am learning C++ and English
To fix call
AfxDaoTerm
before yourExitInstance
- Says this in appcore.cpp. It is anASSERT
- A check that is only performed in debug builds - This is by design. Steve -
To fix call
AfxDaoTerm
before yourExitInstance
- Says this in appcore.cpp. It is anASSERT
- A check that is only performed in debug builds - This is by design. Steve