ACC2: Overview of Conversion from Version 1.1 to 2.0 Issues

ID: Q112120


The information in this article applies to:


SUMMARY

Moderate: Requires basic macro, coding, and interoperability skills.

When you convert your Microsoft Access version 1.x databases to version 2.0 format, you may have to make some modifications to make sure your databases will perform correctly.


MORE INFORMATION

There are some differences in the formats of Microsoft Access version 1.x and version 2.0 databases. These differences may cause unexpected results when you are using converted databases. Details of the database format changes from version 1.x to 2.0 are listed in Appendix C of the Microsoft Access 2.0 "Building Applications" manual.

The Convert Database command on the File menu, available only when you do not have a database open, can be used to convert databases from version 1.x format to version 2.0 format. When you convert a database from version 1.x to version 2.0 format, all database objects are converted. The following sections describe how the various database objects are converted:

Tables

Tables are automatically converted to version 2.0 database format. Tables that were attached in version 1.x can still be used, but you should refresh all attachments to take advantage of Microsoft Access 2.0's ability to send conversion functions (such as CLng(), CStr(), and so on) to the server rather than processing them locally.

Use the Attachment Manager Add-in in Microsoft Access 2.0 to refresh all the attachments, rather than deleting and re-attaching each attachment as in Microsoft Access 1.x. If an attachment is deleted, all the properties set in the current database for that attachment are lost. To use the Attachment Manager Add-in, choose Add-ins from the File menu, then choose Attachment Manager.

Queries

Microsoft Access automatically compiles queries before running them. The first time you run a query in version 2.0, the compiled format of the query will be discarded and it will be recompiled. Then, the new compiled format will automatically be saved.

Forms and Reports

Forms and reports are converted temporarily into memory as they are opened. As a result, you can gain a small performance increase if you open and then resave all of your pre-existing forms and reports in Microsoft Access version 2.0, so that Microsoft Access does not have to convert them as you use them.

Macros

Macros are not converted. The format for macros is not changed in Microsoft Access version 2.0.

Modules

The internal format of modules is changed in Microsoft Access version 2.0. Version 2.0 automatically converts modules when they are loaded into memory. However, the converted code is not saved until you save the module. For that reason, you are prompted to save a converted module the first time you close it whether you make changes to it or not. If the converted module is not saved, the conversions are lost. This prompt occurs every time an unconverted module is closed until you save it.

Default Values and Validation Rules

Some default value expressions and validation rules, valid in version 1.x databases, may not be valid in version 2.0 databases.

In Microsoft Access version 2.0, validation rules are evaluated starting at the table level. Validation rules in forms or elsewhere are evaluated in addition to table-level validation. At the table level, version 2.0 does not allow the following in validation rules:
During the conversion process, a table named ConvertErrors will be created and filled with descriptions of any default value expressions or validation rules that were not converted. It may be necessary to check all data objects for "#Name?" errors.

Changes to Reserved Words and Function Names

There are many new reserved words and function names. "Reserved" means that the word or function name has special significance to Microsoft Access version 2.0 and cannot be used as a user-specified control name, function name, and so on. The Microsoft Access Help system and Appendix C of the Microsoft Access 2.0 "Building Applications" manual lists new reserved words. General rules include:

SendKeys Action or Statement

If you use the SendKeys statement or action to fill in dialog boxes or choose commands from menus, the changes in some version 2.0 dialog boxes and menus may require you to recode the statement. Because changes are likely to occur with each version of Microsoft Access, it is a good idea to try to avoid using SendKeys when possible. See Appendix C of the "Building Applications" manual for tips on avoiding the use of SendKeys.

Security

If a version 1.x database is secured, it will remain secure whether it is opened using version 1.x or version 2.0. However, Microsoft Access 2.0 cannot be used to change or add permissions in the database, even by the administrator, until the database is converted to version 2.0.

When you install Microsoft Access 2.0 it creates its own workgroup file (SYSTEM.MDA). If Microsoft Access version 2.0 is installed in the same directory as version 1.x, the version 1.x SYSTEM.MDA file will be renamed SYSTEM1X.MDA.

To make changes to the security of a converted database, you must use a version 2.0 SYSTEM.MDA that has identical groups and users (and identical PIDs) as the original SYSTEM.MDA.

NOTE: PIDs (Personal IDs) in Microsoft Access version 2.0 are the equivalent of PINs (Personal ID Numbers) in version 1.x.

How to Create a Secure Workgroup:
  1. Use the Workgroup Administrator tool to create a new workgroup. This is a version 2.0 SYSTEM.MDA file.


  2. Re-create all the users and groups using the same names and PIDs that were used in Microsoft Access version 1.x.


How to Convert a Secure 1.x Database to 2.0 Format:

NOTE: In a secure workgroup, only users with Modify Design permissions to all of the objects can convert a version 1.x format to version 2.0 format. Also, you must assign Modify Design permissions to the version 1.x database in Microsoft Access version 1.x using the version 1.x workgroup.
  1. Make sure that no one is using the version 1.x database.


  2. Log on to Microsoft Access 2.0 as a member of the Admins group who is not the Admin user.


  3. From the File menu, choose the Convert Database command.


  4. Select the version 1.x database you want to convert. You will be prompted for the version 2.0 database name.

    NOTE: The Convert Database command will force you to choose a new name for the database. This lets you keep a backup copy of your version 1.x database, as once you have converted a database from version 1.x to version 2.0 you CANNOT convert it back to version 1.x.


  5. Have your users join the new version 2.0 workgroup (SYSTEM.MDA) by using the Workgroup Administrator tool.

    NOTE: You can also accomplish this by modifying the MSACC20.INI file in your Windows directory. In the [Options] section of the file, change the SystemDB entry to point to the version 2.0 SYSTEM.MDA file. The [Options] section of the file will be similar to the example below:
    
          [Options]
          SystemDB=<microsoft access path>\SYSTEM.MDA 


Verifying Conversion

To determine if a database was converted from Microsoft Access version 1.x to version 2.0 with the Convert Database command correctly, check the V1xNullBehavior property. This property is not available if the database was converted by Access Basic code. It is available only if the database was converted using the Convert Database command on the File menu.

The sample function below uses the V1xNullBehavior property to determine if a database was converted from Microsoft Access version 1.x to version 2.0 with the Convert Database command. The flag variable IsConverted holds the function's result. If IsConverted is True (-1,) then the database was converted with the Convert Database command.

   Function IsConverted (checkdb As String)
      On Error GoTo NotFound
      Dim MyDatabase As Database, V1xNull As Integer
      Set MyDatabase = DBEngine.Workspaces(0).OpenDatabase(checkdb)

      V1xNull = MyDatabase.properties.V1xNullBehavior
      IsConverted = True
      MyDatabase.Close
      Exit Function

   NotFound:

      If Err = 3024 Then
         MsgBox "Could not find database."
      Else
         IsConverted = False
         MyDatabase.Close
      End If
      Exit Function

   End Function 

To use this function, type the following in a module's Immediate window, and then press ENTER:

? IsConverted("<yourdatabasename>.MDB")

Note that a native version 2.0 database will return a 0 when used with this function.

To check which version of Microsoft Access a SYSTEM.MDA file was created with, use the following sample Access Basic function:

   Function CheckSysDbVer (sysdbname As String) As String
      Dim d As Database
      Set d = DBEngine(0).OpenDatabase(sysdbname)
      CheckSysDbVer = d.version
      d.Close
   End Function 

To use this function, type the following in a module's Immediate window and then press ENTER:

? CheckSysDbVer("<microsoft access path>\SYSTEM.MDA")

Conversion Errors

If the process of converting a 1.x database to version 2.0 results in any unexpected errors or problems, such as a general protection (GP) fault or Microsoft Access closing itself, try running the Repair command (from the File menu) in Microsoft Access version 1.x on the version 1.x database. Then, try to convert the database again. Some version 1.x databases may have slight errors that go undetected until you try to convert the database in version 2.0, because version 2.0 is better at detecting database problems.


REFERENCES

Microsoft Access "User's Guide," version 2.0, Chapter 1

Microsoft Access "Building Applications," version 2.0, Appendix C

For more information about converting databases, search for "Convert Database," and then "Convert Database Command" using the Microsoft Access Help menu.

Additional query words: permission upgrading upgrade


Keywords          : kbsetup StpOthr 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: April 2, 1999