Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: RepairDatabase Method Is No Longer Available in DAO 3.6


View products that this article applies to.

Symptoms

If you issue a DbEngine.RepairDatabase method after you change your project references from Microsoft DAO 3.51 Object Library to Microsoft DAO 3.6 Object Library, you may receive the following error message:
Error # 3251 was generated by DAO.DbEngine.
Operation is not supported for this type of object.
Or, you may notice that the method is not available through IntelliSense when you issue a DbEngine.RepairDatabase method.

↑ Back to the top


Cause

In Data Access Object (DAO) 3.6, the RepairDatabase method is no longer available or supported. This is by design to match Microsoft Jet 4.0.

↑ Back to the top


Resolution

If you need this functionality, you can use the CompactDatabase method, which also repairs a Microsoft Jet database.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Create a new standard EXE project in Visual Basic.
  2. From the Project menu, click Reference, and then click Microsoft DAO 3.51 Object Library.
  3. Paste the following code in the code window:
    DbEngine.RepairDatabase
    						
    Notice that RepairDatabase is available in the list of methods.
  4. Change you project reference to Microsoft DAO 3.6 Object Library.
  5. Paste the following code in the code window:
    DbEngine.RepairDatabase
    						
    Notice that RepairDatabase is not available from the list of methods.

↑ Back to the top


References

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
230727 INFO: Visual Studio 6.0 SP3 Readme: Part 4 - Visual C++
230501 HOWTO: Compacting Microsoft Access Database via ADO

↑ Back to the top


Keywords: KB294966, kbprb, kbjet

↑ Back to the top

Article Info
Article ID : 294966
Revision : 5
Created on : 2/12/2007
Published on : 2/12/2007
Exists online : False
Views : 539