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. Cant open MS Access 2000 db

Cant open MS Access 2000 db

Scheduled Pinned Locked Moved C / C++ / MFC
databaseannouncementwindows-adminhelpquestion
5 Posts 3 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.
  • A Offline
    A Offline
    Ammar
    wrote on last edited by
    #1

    Hi, I cant access Access 2000 file from VC 6 Enterprise Edition. I tried opening the database and got the "Unrecognized database format ". Earlier that file was created in Access 97 format (thru VC) and it was working fine. The problem is that I converted that file to Access 2000. One thing is that Access 97 had Jet Version 3.0. And Access 2000 has version 3.5/4 (I got this info from registry). Any one any ideas? Any update I have to install? If yes, plz give me the URL. Thanks, Ammar

    M 1 Reply Last reply
    0
    • A Ammar

      Hi, I cant access Access 2000 file from VC 6 Enterprise Edition. I tried opening the database and got the "Unrecognized database format ". Earlier that file was created in Access 97 format (thru VC) and it was working fine. The problem is that I converted that file to Access 2000. One thing is that Access 97 had Jet Version 3.0. And Access 2000 has version 3.5/4 (I got this info from registry). Any one any ideas? Any update I have to install? If yes, plz give me the URL. Thanks, Ammar

      M Offline
      M Offline
      Masaaki Onishi
      wrote on last edited by
      #2

      Hello, the codegurus around the world. ;) Configuration of Access 2000 issue is known well as the bug at VC++. You can find the solution in MSDN magazine or MSDN help, I think. Some header file, which I forgot, configures which version of Access is used in VC++ project. So, we simply add the new lines to this header file for Access 2000.:rolleyes: Have a nice day! -Masaaki Onishi-

      L 1 Reply Last reply
      0
      • M Masaaki Onishi

        Hello, the codegurus around the world. ;) Configuration of Access 2000 issue is known well as the bug at VC++. You can find the solution in MSDN magazine or MSDN help, I think. Some header file, which I forgot, configures which version of Access is used in VC++ project. So, we simply add the new lines to this header file for Access 2000.:rolleyes: Have a nice day! -Masaaki Onishi-

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Actually I do not think this is a bug, the problem comes from the fact that the Access 2000 uses new version of DAO (3.6) and MFC by default supports version 3.5. To correct this all you have to do is chage version of MFC that you are using. This can be done with following line of code, just make sure that you call this before you try to open the database: AfxGetModuleState()->m_dwVersion = 0x0601; Pz

        A 2 Replies Last reply
        0
        • L Lost User

          Actually I do not think this is a bug, the problem comes from the fact that the Access 2000 uses new version of DAO (3.6) and MFC by default supports version 3.5. To correct this all you have to do is chage version of MFC that you are using. This can be done with following line of code, just make sure that you call this before you try to open the database: AfxGetModuleState()->m_dwVersion = 0x0601; Pz

          A Offline
          A Offline
          Ammar
          wrote on last edited by
          #4

          Hi, Many many thanks. I think your line of code works. Atleast it went thru that line in debug mode. :) One more thing... I am creating an access file in runtime with this code: db.Create("DOB.mdb", dbLangGeneral, dbVersion30); db.Execute("CREATE TABLE DOB (Name Text, Email Text)"); What happens is that this creates a file comaptible with Access97. Now I want to create a file for Access2000. dbVersion30 is for A97. I tried dbVersion35 and dbVersion40 but these two are undeclared identifier. How to create Access2000 mdb file? I have VC 6.0 Enterprise Ed. Ammar

          1 Reply Last reply
          0
          • L Lost User

            Actually I do not think this is a bug, the problem comes from the fact that the Access 2000 uses new version of DAO (3.6) and MFC by default supports version 3.5. To correct this all you have to do is chage version of MFC that you are using. This can be done with following line of code, just make sure that you call this before you try to open the database: AfxGetModuleState()->m_dwVersion = 0x0601; Pz

            A Offline
            A Offline
            Ammar
            wrote on last edited by
            #5

            Thanks for the solution. It works fine. :) However I couldnt find any info on AfxGetModuleState() in MSDN. Can you help me on this? Where to find info about this API and AFX_MODULE_STATE ? Your email address will be appreciated. :) Thanks, Ammar

            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