PRB: RepairDatabase Method Is No Longer Available in DAO 3.6

Article translations Article translations
Article ID: 294966 - View products that this article applies to.
This article was previously published under Q294966
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page


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.


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.


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


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:
    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:
    Notice that RepairDatabase is not available from the list of methods.


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


Article ID: 294966 - Last Review: February 28, 2014 - Revision: 3.2
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Access 2000 Standard Edition
  • Microsoft Access 97 Standard Edition
kbnosurvey kbarchive kbjet kbprb KB294966

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from