Oh, My Aching Database
The databases I create with the Visual Basic 4.0 Data Manager (16 bit and 32 bit) are not fully compatible with Microsoft Access 7.0 for Windows 95. If I create it in Visual Basic 4.0 and open the datafile (mdb format) in Microsoft Access 7.0, Access says it can open the file but not manipulate its objects. If I create or modify the database in Microsoft Access 7.0, it is no longer readable with Visual Basic 4.0.
What gives? It is hard to believe that Microsoft has made these two state-of-the-art programs incompatible. I buy the latest (current) releases, and they cannot work together.
Is there a fix for this omission?
Peter Robinson
Databases are like drugs a doctor might prescribe: Sometimes they can be mixed, and sometimes they can't be. In this case, the different drugs have some bad interactions.
Microsoft Access 7.0 changed the database format, so databases created with it can only be accessed by Microsoft Access 7.0. However, you can access Microsoft Access 7.0 databases by using the 32-bit version of Visual Basic 4.0 and including a reference to the "Microsoft DAO 3.0 Object Library." Including this reference in your project will allow you to programmatically open databases created in both version 2.0 and version 7.0 of Microsoft Access. If you are using the Data Manager to create or open a database, be sure you are using the 32-bit version of Visual Basic so that it will create a database that can be used by Microsoft Access 7.0.
The 16-bit version of Visual Basic, however, will only create and open databases that are compatible with Microsoft Access 2.0. To use these databases programmatically in the 16-bit version of Visual Basic, add the "Microsoft DAO 2.5 Object Library" reference to your project. Using the Data Manager from the 16-bit version of Visual Basic will allow you to create and open a database compatible only with Microsoft Access version 2.0.
If you have trouble opening a Microsoft Access database, be sure that you are using the correct version of Visual Basic, 16-bit or 32-bit, and look at the references you have in the project.