Access has detected corruption in this file

Discussion in 'Microsoft Certification' started by Martincruise, Oct 19, 2009.

  1. Martincruise

    Martincruise

    Joined:
    Oct 19, 2009
    Messages:
    1
    I face the below error message, when I attempt to mount an Access database
    "Microsoft Access has detected corruption in this file. To try to repair the corruption, first make a backup copy of the file. Then, on the Tools menu, point to Database Utilities and click Compact and Repair Database. If you are currently trying to repair this corruption then you will need to recreate this file or restore it from a previous backup."

    What can I do resolve the error?
     
    Martincruise, Oct 19, 2009
    #1
    1. Advertising

  2. Martincruise

    Davidpoul

    Joined:
    Aug 10, 2009
    Messages:
    3
    Location:
    India
    To resolve the above error message and access the data stored in the database, you will need to follow these steps:

    1. Create a blank database = “C:\ Recover_db.mdb”
    2. Close and exit.
    3. Create another blank database and navigate to Modules Tab
    4. Click on New and Paste the code provided below:

    Dim db As DAO.Database

    Set db = DAO.OpenDatabase("C:Corrupt_db.mdb")

    Dim xtable As TableDef

    For Each xtable In db.TableDefs

    If Mid(xtable.Name, 1, 4) <> "MSys" Then

    rSQL = "SELECT * INTO [" & xtable.Name & "] IN " & _

    "'C:Recover_db.mdb'" & _

    " FROM [" & xtable.Name & "]"

    db.Execute rSQL

    End If

    Next xtable

    MsgBox "Process Complete."

    End Function

    5. Go to Menu Tools, select References, and scroll down and Select "Microsoft DAO 3.6 Object Library"
    6. Click OK
    7. In Module Window Click on Recover_db() Function
    8. Check database file names, after proper setup and press the F5 button
    9. Tables and data from corrupt database is recovered to new database

    Another way to resolve the problem (as stated in the error message) is by using an inbuilt repair utility known as “Compact and Repair.” However, if the inbuilt repair utility fails to repair the database, then you need to use advanced Access Repair application as Stellar Phoenix Access Recovery software.
     
    Davidpoul, Oct 20, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simply Me

    A problem has been detected...

    Simply Me, Nov 2, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    15,606
    SwissTony
    Nov 2, 2004
  2. A Teuchter
    Replies:
    2
    Views:
    818
    A Teuchter
    May 19, 2005
  3. mfa
    Replies:
    3
    Views:
    473
    Ed Fortmiller
    Sep 2, 2003
  4. vadzz
    Replies:
    1
    Views:
    1,665
    Duane Arnold
    Mar 28, 2006
  5. RichA
    Replies:
    0
    Views:
    185
    RichA
    Feb 28, 2013
Loading...

Share This Page