PRB: Access 7.0 Database Corrupt After Calling RepairDatabaseLast reviewed: July 7, 1997Article ID: Q167906 |
The information in this article applies to:
SYMPTOMSIf you call CDaoWorkspace::RepairDatabase() or CdbDbEngine::RepairDatabase on a corrupt Access 7.0 database, it may result in a database that is so corrupt that it cannot be recovered.
CAUSEThe MSysObjects system table is corrupted.
RESOLUTIONYou should always call CDaoWorkspace::CompactDatabase() before calling CDaoWorkspace::RepairDatabase() on an Access 7.0 database. It is a good idea to compact, repair, and backup your database frequently.
MORE INFORMATION
Sample Code
/* Compile options needed: none */ // The following code will repair the database C:\DB1.MDB // using the MFC DAO classes try { CDaoWorkspace::CompactDatabase( _T( "C:\\DB1.MDB" ), _T( "C:\\DB2.MDB" ) ); CDaoWorkspace::RepairDatabase( _T( "C:\\DB2.MDB" ) ); } catch( CDaoException* e ) { AfxMessageBox( e->m_pErrorInfo->m_strDescription ); e->Delete(); } REFERENCESFor additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q109953 TITLE : INF: How to Repair a Damaged Database ARTICLE-ID: Q158933 TITLE : PRA: Error "<Database Name> Isn't an Index in This Table" |
Additional query words: Jet 3.0
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |