You receive an "Unrecognized Database Format" error message when you use the MFC AppWizard or Class with a DAO data source and an Access 2000 .mdb file (232337)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q232337

SYMPTOMS

Using the MFC AppWizard or ClassWizard with a DAO data source and an Access 2000 .mdb file causes a failure with the following error message:
Unrecognized Database Format

CAUSE

The Wizards use DAO version 3.5, which cannot read Access 2000 .mdb files.

RESOLUTION

Convert the .mdb file to a previous version to use it with MFC AppWizard or ClassWizard.

STATUS

Microsoft has confirmed this to be a problem with the Microsoft products listed at the beginning of this article.

MORE INFORMATION

To convert the Access 2000 .mdb file to Access 97 format complete the following steps:
  1. From the Access 2000 main menu, click Tools.
  2. Select Database Utilities.
  3. Click Convert Database.
  4. Select To Prior Access Database Version.NOTE: The .mdb file can also be converted programmatically by using the DAO DBEngine CompactDatabase method.
MFC version 6.0 will by default use DAO 3.5. In order for your application to use DAO 3.6 and work with Access 2000 the .mdb files, you need to define the following in your application:
AfxGetModuleState()->m_dwVersion = 0x0601;
				

REFERENCES

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

230485 How to create an Access 2000 database with MFC DAO


Modification Type:MajorLast Reviewed:4/29/2005
Keywords:kbDatabase kbprb kbwizard KB232337 kbAudDeveloper