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. CDaoDatabase Open Jet Database Crashing

CDaoDatabase Open Jet Database Crashing

Scheduled Pinned Locked Moved C / C++ / MFC
databasecsharpc++visual-studiohelp
2 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.
  • J Offline
    J Offline
    John Clump
    wrote on last edited by
    #1

    Hi everyone. I have an MFC app which usesDAO to access Jet/Access databases. The development machine is Win2000 sp3 with Visual Studio 6 installed. The app is statically linked so MFC DLL version conflicts shouldn't be an isue. The app works 100% of my development machine, but I tried it on a Win98se machine and it won't open a Jet database file. The Win98se machine has DCOM98 and MDAC 2.5 installed on it, and only necessary software installed. Only my app is running whne I tested it. The app runs fine until I attempt to open a database. The code below is how I open the database CDaoDatabase* db; CEDaoRecordset* rs; CString strSQL; long int lTemp; try { db = new CDaoDatabase(); db->Open(strDBPath, FALSE, TRUE, _T(";PWD=")); rs = new CEDaoRecordset(db); //.. strDBPath is the path to the DB Jet database file, which is known to be valid, and not read-only. Once it hits db->Open() I get an "unknown exception" error and the program closes. I know it could be anything, but does anyone have any ideas as to what could cause this? Did I forget to install something? The app is MBCS based, not unicode.

    T 1 Reply Last reply
    0
    • J John Clump

      Hi everyone. I have an MFC app which usesDAO to access Jet/Access databases. The development machine is Win2000 sp3 with Visual Studio 6 installed. The app is statically linked so MFC DLL version conflicts shouldn't be an isue. The app works 100% of my development machine, but I tried it on a Win98se machine and it won't open a Jet database file. The Win98se machine has DCOM98 and MDAC 2.5 installed on it, and only necessary software installed. Only my app is running whne I tested it. The app runs fine until I attempt to open a database. The code below is how I open the database CDaoDatabase* db; CEDaoRecordset* rs; CString strSQL; long int lTemp; try { db = new CDaoDatabase(); db->Open(strDBPath, FALSE, TRUE, _T(";PWD=")); rs = new CEDaoRecordset(db); //.. strDBPath is the path to the DB Jet database file, which is known to be valid, and not read-only. Once it hits db->Open() I get an "unknown exception" error and the program closes. I know it could be anything, but does anyone have any ideas as to what could cause this? Did I forget to install something? The app is MBCS based, not unicode.

      T Offline
      T Offline
      Terry ONolley
      wrote on last edited by
      #2

      Have you caught the exception and analyzed it? You should be able to get detailed error information if you use try{}catch{} and take a look at the error codes being returned. Are you 100% sure that the database itself was copied over exactly? If both machines are trying to access the same DB, then you may want to look at the DB driver versions installed on each machine. Your development platform may be using different drivers.



      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