Microsoft Knowledge Base Email Alertz

KBAlertz.com: (115779) - Error 3041 Incompatible database version is the result when you use the Microsoft Access 2.0/Visual Basic 3.0 Compatibility Layer to open a Microsoft Access version 1.1 database that was compacted by using the CompactDatabase statement with the...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **


Community Site



We Send hundreds of thousands of emails using ASP.NET Email


ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 115779 - Last Review: November 18, 2003 - Revision: 2.0

BUG: Compacted 1.1 DB Becomes 2.0 DB w/ Compatibility Layer

This article was previously published under Q115779

On This Page

SYMPTOMS

Error 3041 "Incompatible database version" is the result when you use the Microsoft Access 2.0/Visual Basic 3.0 Compatibility Layer to open a Microsoft Access version 1.1 database that was compacted by using the CompactDatabase statement with the DB_VERSION10 option.

CAUSE

According to the README.TXT file for the Compatibility Layer, after installing the Compatibility Layer, the CompactDatabase statement in Visual Basic version 3.0, when used with the DB_VERSION10 constant (from the file DATACONS.TXT), is supposed to generate a Microsoft Access version 1.1 database. The following table shows which type of database is supposed to be created when you use CompactDatabase with and without DB_VERSION10:
------------------------------------------------------------------
Jet Database Engine   Creates by Default      With DB_VERSION10
------------------------------------------------------------------
Version 1.1           Version 1.1 database    Version 1.0 database
Version 2.0           Version 2.0 database    Version 1.1 database
				
However, this is not what happens. There is a bug in the Compatibility Layer that causes the CompactDatabase statement to always create a Microsoft Access version 2.0 database regardless of the existence of the constant DB_VERSION10 as an option. Both the Office Development Kit (ODK) and Access Developer's Toolkit (ADT) versions of the Compatibility Layer have this problem.

WORKAROUND

Use Microsoft Access version 1.1 or 2.0 to compact a version 1.1 database instead of using the CompactDatabase statement from the Compatibility Layer.

NOTE: Once a database is in Microsoft Access version 2.0 format, you cannot convert it back to Microsoft Access version 1.1 format directly. If you used CompactDatabase and ended up turning a version 1.1 database into a version 2.0 database, you need to restore the version 1.1 database from a backup copy, or rebuild it by extracting the information from the newly compacted version 2.0 database and placing it into a new version 1.1 database.

WARNING: If the Compatibility Layer has been installed and you're using a Microsoft Access version 1.1 database with a Visual Basic application, NEVER use CompactDatabase on the version 1.1 database if you want it to remain in version 1.1 format. Instead, use Microsoft Access itself to compact version 1.1 databases.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

The following steps reproduce the problem if the Compatibility Layer is installed on your computer:

  1. Start a new project in Visual Basic. Form1 is created by default.
  2. Add a command button (Command1) to Form1.
  3. Place the following code in the Command1 Click event procedure:
       Sub Command1_Click ()
          Const DB_VERSION10 = 1               'Microsoft Access Version 1.1
          Const DB_LANG_GENERAL = ";LANGID=0x0809;CP=1252;COUNTRY=0"
    
          ' The following should compact a 1.1 Database into a 1.1 Database.
          ' But it actually compacts a 1.1 Database into a 2.0 Database.
          ' Enter the following code as one, single line:
          CompactDatabase "C:\VB\BIBLIO.MDB", "C:\VB\NEWBIB.MDB",
             DB_LANG_GENERAL, DB_VERSION10
       End Sub
    						
  4. Press the F5 key to run the program, and click the Command1 button. This results in an "Incompatible Database Version" error if the resulting compacted database, which is now in Microsoft Access version 2.0 format, is used on a computer that does not have the Compatibility Layer installed.

APPLIES TO
  • Microsoft Visual Basic 3.0 Professional Edition
  • Microsoft Access 2.0 Standard Edition
Keywords: 
kbbug KB115779
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please