Friday, April 10, 2009

Decompiling an Access Database

Sometimes your database starts to exhibit unexplained behaviour- something that used to work suddenly stops working, or seemingly inexplicable errors appear. Or sometimes the database gets larger than it used to be (even after compact/repair) or starts to load much more slowly.

One of the solutions often recommended is to decompile the database. Decompiling is done using a command line switch, and it seems to be an undocumented option. The links below provide instructions and additional information on decompiling. Note that some of the articles talk about decompiling actually introducing problems sometimes, so it seems like it's best to only decompile when you have reason to suspect a problem and to make a copy of the database before decompiling.

Here are the links:

3 comments:

Martin Saunders said...

I have found that sometimes the decompile does not work as well in Access 2007, but have found an alternative that may work for you also.

Access 2007
1. Open your database normally.
2. In the main access menu go Manage -> Back Up Database.
3. Choose where you want the database to be backed up.
Now the back up contains the same vba code / form data / table data as the original.
4. Close the database and rename it to something else eg. MyDatabasebak.accdb.
5. Rename the backup you made to the name of the original file eg. MyDatabase.accdb.

Thats all you need to do. Thank you for this useful blog!
Cheers.

Martin Saunders

PS. I have never tested this on anything other than Access '07

Access Training said...

It seems the backup does more than the compact/repair. Thanks for the useful tip, Martin. I am hesitant to use other methods when not necessary...The same thing works in Quicken databases with a copy of the database cleaning out the bloat.
Billy Gee

Alexis said...

There is a good tool which recover office files and possible more-MDB Repair.It helped me many times and tool is free as far as I know.Moreover utility can preview of the structure of the recovered data and the contents of table columns.