CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2003
    Posts
    8

    97 Access vs. 2003 Access

    I'm just a beginner at this, so be gentle. Years ago I created a program which accessed a database that utilized the Microsoft Access 97 format. The program worked successfully until my office computer was updated. Right now I am operating with Access 2003 and some of my original VB program no longer works. It will work when accessing my Access97 database, but will not when using a database created in Access 2003. Nothing else in the program changed. I get prompted with messages like "Unrecognized database format". Right now I'm at a point where I can't proceed- any ideas?

    Sincerely,
    GBenz

  2. #2
    Join Date
    Jan 2004
    Location
    San Diego
    Posts
    148

    Re: 97 Access vs. 2003 Access

    The Office 2003 application suite does not have automatic compatibility with some older versions of the Office applications and in some cases the 2002-2003 versions of the programs have entirely different file format structures from previous versions. This will result in "unrecognized format" and other errors when attempting to run programs designed for earlier versions of the Office programs. You have two options to fix this.

    First, you can save your Access 2003 database set for compatibility with older Access versions. Select Options... from the Tools menu and under the Advanced tab set the file format to Access 2000 (the last version using the old file format system compatible with Access 97).

    Or you can modify your program so that it includes Access 11.0 (Access 2003 version) Object Library. Some methods/events/functions that work with the older versions of the Access Object libraries may not work with the Access 2003 Object Library or utilize a differently named method/event/function. You can check your version and run the code compatible for that version with a simple If statement.
    Code:
    If MyAccessApp.Version > 10 Then
      'code for doing Access 2003 compatible operations
    Else
      'code for doing older Access version operations
    End If
    This second option is probably the more convenient if your program is used widely in your workplace or something; but it will require more coding and debugging on your part to get up and running again.
    Death is life's special way of telling you you're fired.

    For I do not seek to understand in order to believe, but I believe in order to understand. For I believe this: unless I believe, I will not understand. - Anselm of Canterbury (1033–1109)

  3. #3
    Join Date
    Jan 2004
    Location
    San Diego
    Posts
    148

    Re: 97 Access vs. 2003 Access

    Another note regarding my last post.

    It may entirely be possible that merely adding the Access 11.0 Object Library as a reference will fix the problem. Many of the methods that were dropped/changed from older versions of the object library were probably somewhat obscure or little used by most programmers so you may not need to check for version compatibility. Just add the object library to your project references, recompile and you'll be good to go.
    Death is life's special way of telling you you're fired.

    For I do not seek to understand in order to believe, but I believe in order to understand. For I believe this: unless I believe, I will not understand. - Anselm of Canterbury (1033–1109)

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    530

    Re: 97 Access vs. 2003 Access

    If you have/use any MS DAO 3.5 references or less than 3.5 in your VB program, you'll need to update these to 3.6 minimum for the VB program to access the database. At least, I think 3.6 - I'm not at my work PC at the mo so can't double check. Use the highest version you can....

    It might not be an issue for you, but it came up with me a few months back when a customer needed to upgrade from access 97 to access 2000 and our VB app disagreed.

  5. #5
    Join Date
    Jul 2002
    Posts
    41

    Re: 97 Access vs. 2003 Access

    if you have developer editions of these you can set up database applications that are independant of acces versions. Access 97 developer allowed you to distribute patched files but 2000 onwards distributes the original un patched files. The reference to the ADO/DAO 4.0 would be obvious firt try as this is where all aspects of the databse structure or entity are located ie Dim db as database or rst as recordset these objects come from that library. If your code simply read writes to the database you can use VB independant of Access versions.

  6. #6
    Join Date
    May 2001
    Posts
    91

    Re: 97 Access vs. 2003 Access

    Hi,

    I disagree with all the previous posters, as from my experience (in my company we tried to convert several Access97 clients to newer versions i.e. 2000) you can forget about making the app work in Access 2003 with any automatic converting. This just does not work correctly, and the resulting code is more or less unusable.
    I think the best way is just to start from scratch.
    have a nice day

    Patzer
    _____________________________
    Philo will never be forgotten

  7. #7
    Join Date
    Feb 2003
    Posts
    8

    Re: 97 Access vs. 2003 Access

    Thanks to all who have taken the time to help. I am working with the Professional Version of VB6 and my problem is mainly associated with the data control. I have run a test program with Microsoft Access 11.0 Object Library and Microsoft DAO 3.6 Object Library references checked. I still cannot access a simple database created in Access 2003 without getting prompted with a message box telling me of an unrecognized database format. The simple test program will work with an Access 97 database, but not a Access 2003 database. The saga continues and I am still searching for the answer.

    Sincerely,
    GBenz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured