Compact & Repair not working for Microsoft Access Database 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalskedar
    New Member
    • Sep 2009
    • 66

    Compact & Repair not working for Microsoft Access Database 2003

    The Compact & Repair option is not working on 1 of the computers .The Operating system used is Windows XP.

    In the Database,when the Compact & Repair option is used it creates a separate file as db1.mdb.

    Whereas other computers this option works fine..it no longer creates db1.mdbs separately.

    Does the computer which is not able to do Compact & Repair require any specific setting..
    Can anyone Plz help me with some solution for this .
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    If you check you will probably find there is a lock file (*.ldb) on the computer that won't complete the Compact and Repair. This was probably left behind after a crash or the database closing incorrectly. This file will have to be deleted.

    Essentially compact and repair will only work when the database is opened exclusively by the user running it. If the lock file is present it assumes another user has the database open and therefore it creates the db1 file instead.

    Mary

    Comment

    • shalskedar
      New Member
      • Sep 2009
      • 66

      #3
      Thanks.
      Had been checked several times that the Database is opened exclusively but still this error occurs..

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        It's not so much that the database has to be open exclusively but rather there cannot be any other users currently on the database.

        Are you sure that there is no *.ldb file either in the frontend or backend locations of the database? This is the only circumstances I'm aware of that causes this problem.

        Comment

        • dsatino
          Contributor
          • May 2010
          • 393

          #5
          You should also know that compact and repair always creates db1.mdb. Basically compact and repair makes a duplicate of the database without all the excess garbage it's collected, deletes your db, and then renames the db1 to your db name.

          So you can see the compact is working to an extent. I would go with Mary's advice, search for that .ldb file. It's the only thing I can think of that would cause your problem.

          Comment

          Working...