Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Debug Assertion Failed when connecting Access, why?

Debug Assertion Failed when connecting Access, why?

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasedebugginghelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ewighell
    wrote on last edited by
    #1

    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

    E S 2 Replies Last reply
    0
    • E ewighell

      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

      E Offline
      E Offline
      ewighell
      wrote on last edited by
      #2

      I built a simplest program to test it, the same thing happens. Thank you very much!!! ------------------- I am learning C++ and English

      1 Reply Last reply
      0
      • E ewighell

        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

        S Offline
        S Offline
        Stephen Hewitt
        wrote on last edited by
        #3

        To fix call AfxDaoTerm before your ExitInstance - Says this in appcore.cpp. It is an ASSERT - A check that is only performed in debug builds - This is by design. Steve

        E 1 Reply Last reply
        0
        • S Stephen Hewitt

          To fix call AfxDaoTerm before your ExitInstance - Says this in appcore.cpp. It is an ASSERT - A check that is only performed in debug builds - This is by design. Steve

          E Offline
          E Offline
          ewighell
          wrote on last edited by
          #4

          Thank you very much!!! ------------------- I am learning C++ and English

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups