G
geo
I maintain about a dozen different Microsoft Access databases. With a couple
of them, I am sporadically (with some of the DBs it happens more consistently
than with others) getting an error message when I try to compact and repair
the database (Tools - Database Utilities - Compact and Repair Database). The
error message says "Cannot open database" and "It may not be a database that
your application recognizes, or the file may be corrupt." If I press "Help"
then I get a description for an error 3049. Otherwise, the databases in
question seem to be functioning just fine.
I have been looking through the message boards and the advice to this error
message seems pretty consistent - your database is probably corrupt so try to
recreate or restore from a backup or maybe try and salvage your current DB
file.
Here is the strange thing - for the few databases that I have experienced
this error for, disabling automatic startup code (like an autoexec macro)
consistently fixes the problem. Basically, I disable the startup code, run
compact/repair (gives no errors now) then re-enable the startup code.
So, just for kicks I tried to create a completely blank database with nothing
but a single macro in it. It is an autoexec macro that just has a quit
command. Then I went into Tools - Options - General, and enabled "Compact on
Close." Following this, I tried to repeatedly open the database. In roughly 5%
of the times, however, I got the above error message.
It looks almost as if the corruption message can be induced by some sort of a
race condition in addition to a no-kidding corrupted database.
Has anyone had a similar experience with Microsoft Access? What is the actual
sequence of events when a compact/repair action is initiated in Access?
George
www.inspiredbrew.com
of them, I am sporadically (with some of the DBs it happens more consistently
than with others) getting an error message when I try to compact and repair
the database (Tools - Database Utilities - Compact and Repair Database). The
error message says "Cannot open database" and "It may not be a database that
your application recognizes, or the file may be corrupt." If I press "Help"
then I get a description for an error 3049. Otherwise, the databases in
question seem to be functioning just fine.
I have been looking through the message boards and the advice to this error
message seems pretty consistent - your database is probably corrupt so try to
recreate or restore from a backup or maybe try and salvage your current DB
file.
Here is the strange thing - for the few databases that I have experienced
this error for, disabling automatic startup code (like an autoexec macro)
consistently fixes the problem. Basically, I disable the startup code, run
compact/repair (gives no errors now) then re-enable the startup code.
So, just for kicks I tried to create a completely blank database with nothing
but a single macro in it. It is an autoexec macro that just has a quit
command. Then I went into Tools - Options - General, and enabled "Compact on
Close." Following this, I tried to repeatedly open the database. In roughly 5%
of the times, however, I got the above error message.
It looks almost as if the corruption message can be induced by some sort of a
race condition in addition to a no-kidding corrupted database.
Has anyone had a similar experience with Microsoft Access? What is the actual
sequence of events when a compact/repair action is initiated in Access?
George
www.inspiredbrew.com