Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database needs to be repaired or isn't a database file

Status
Not open for further replies.

pepperca

Programmer
Mar 7, 2002
47
US
This is for an Access 2000 database. It is a new database and on a network and just has a few records. They got an error that the database needs to be repaired or isn't a database file. I have written another database in 2000 that has also had this error several times. To my knowledge the databases I have written in Access 97 have not gotten this error.

Does anyone have any ideas?


Thanks for any help!

Cindy
 
As a matter of fact the new database was compact/repaired the morning this happened, and the other database this happens to is compact/repaired at least once a week.
 
Sounds like your database is corrupt. Try importing all your database objects into a new database.

- Open a new Access database.
- Go to File - Get External Data - Import.
- Choose the database that's giving you trouble.
- This should display all objects. Click 'Select All' under all of the tabs.
- Click OK.
- If you have any linked tables, you will need to relink them.
- Compact/Repair the new database.

This should hopefully create a new database for you that's not corrupt.
 
The database will repair and then works fine. If it were corrupt would it repair ok?
 
Are your users still receiving the error after the database was repaired?

Are your users using Access 97 or 2000?
 
No, everything seems to be fine. The other database that has had this problem will be fine and then about a few weeks or even a few months later they might get this message again. Then I repair and everything is ok again. I'm trying to prevent this from happening on this new database and to prevent it from happening again on the other one. By the way they are at two different locations.
Everyone is using Access 2000.
 
Access should be compacted/repaired often to avoid this. You can set the database to automatically compact on close, which should avoid you from having to compact it and should help with the corruption. Set this by:

Tools - Options - General Tab - Check Compact on Close.
 
I don't believe it will compact if other users are in the database. This is on a network and there may be several people using the system at one time. If I set compact up on close won't this generate an error or not work if there are still other users on the database?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top