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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An Access97 database will not repair. Are there any work arounds?

Status
Not open for further replies.

KHerm

Programmer
Jan 9, 2001
80
0
0
US
Today an Access97 database (with links to SQLServer tables) suddenly corrupted. The trouble appeared when a macro was run and the error complained that a table was locked. Access97 was closed and started after it was determined no other users were accessing the database.

The same error occurred, so we decided to run repair. The repair failed, and then the database would not open at all. The error now is "Couldn't repair this database."

Is there any chance of a resurrection of this DB? Five hours of work will be lost if we have to restore.

Thanks in advance!

Ken
 
There is a JetComp utility that you can download from the Microsoft site. I know one of the previous threads mentions this, so either search Tek-Tips for "JetComp", or search the Microsoft site. I've used this successfully on databases that could not be repaired.
 
Try repairing from within ODBC setup in your control panel.

This worked for me brfore, when repair withing access did not!
 
Paddyo, your suggestion sounds intriguing, but when I went to my ODBC setup, I couldn't figure out what to do to start a repair.

GeekGirlau, we downloaded jetcomp.exe, but it doesn't seem to do any repairing, just compacting. Do you have any experience you can share?
 
In ODBC select Add
Then select access Mdb
Then select repair
Then select the database

Im not saying this will work but its worth a shot

Hope you have success

Paul

 
Hi Ken,

If Paul's suggestion doesn't solve your problem, JetComp actually repairs and compacts at the same time. You just need to tell it where the database is located, where to compact it to, and if it has a security file, where the mdw file is and a user name and password.

Let me know if you need any further help.
 
As always, this forum has great help. Thank you both. Unfortunately the database could not be recovered with any of the methods you gave or I found.

Just for the record, I'll recount what I did.

1. Found an archive here with a link to a commercial software that repairs access databases. Downloaded the trial version. Seemed OK, but none of the work that had been saved the day of the corruption was recovered. The software didn't recover any macros or modules.

2. Downloaded jetcomp.exe and ran it. We must have missed something (probably the Access SR-2 update) because it didn't even try to repair, just complained that it wasn't an Access database.

3. Found another archive here about using a hex editor to repair the header. Did that, too, but it made no difference.

4. We got a back up from the night before and the user replaced what was lost in about half the time it took to create.

So chalk one up for human effort over modern technology!

Looks like this database is in the 2% that can't be recovered.

Thanks again, though! I learned a lot!

Ken
 
Anybody who works with Access will face this problem many times, that's why companies switch to Full VB apps or equivalent and SQL Server.

However, one method I didn't see listed here that worked for me even when all the others didn't is to use a command line switch when opening the database (assuming it's not a .mde)

"C:\Program Files\...\MSACCESS.EXE" /decompile "F:\Backend...\DB.mdb"

It's a long shot, but it can undo what a crappy "Compact and Repair" screwed up.

VBSlammer
 
Also just for the record:

I forgot to mention above that I also tried to repair through ODBC which also failed.

Thanks VBSlammer for that last try, but it didn't work either.

Glad we had a backup!

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top