vbams-accessms-access-2003

Programmatically check for Access database corruption?


Is there a way to programmatically check for database object corruption in Access 2003?

My development project has gotten complex enough that it's hard to manually check all the objects after a day of programming to see if some small control, form, report, query, or code object has been corrupted somehow. I already have the data split off into a separate SQL Database stored on another machine, and this project is merely a front-end application to work with the data.

Mostly an academic musing, as I just don't want to get so far - then have corruption put me back several weeks because some seldom used object got corrupted way back when.

Any ideas out there? Thanks in advance for any pointers!

EDITED 12/03/2009 @ 11:51

Sadly, I can only accept one answer - though I got a few very good ones, thank you for all the pointers!


Solution

  • Neither Compact/Repair nor Decompile/Recompile catches all corruption problems, although you should be doing this anyway.

    I use a function to export all Container Docs (and QueryDefs) using SaveAsText into a date/time stamped folder, and use it regularly throughout the day. If I suspect any corruption, I create a new mdb, and use LoadFromText to recreate the objects.