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

Get code from corrupt DB

Status
Not open for further replies.

Skie

Programmer
Jun 21, 2004
475
US
Well, I have an Access database that corrupted after a compact and repair. I get the following error:

This database is in an unexpected state; Microsoft Office Access can't open it.

This database has been converted from a prior version of Microsoft Office Access by using the DAO CompactDatabase method instead of the Convert Database command on the Tools menu (Database Utilities submenu). This has left the database in a partially converted state.

If you have a copy of the database in its original format, use the Convert Database command on the Tools menu (Database Utilities submenu) to convert it. If the original database is no longer available, create a new database and import your tables and queries to preserve your data. Your other database objects can't be recovered.


I should've backed up the DB more often. I was able to import the tables and queries with no problems. Which is great, but I'd really like to be able to get the VBA code out of it. Is there a way to import modules when it's in this state?

Thanks
 
When you say you could import the tables and queries, I take it that you created a new mdb then did the import. Did it show any other objects forms, reports, modules?

I have had issues with mdb before -- not this specific error -- but to make it operational I added another small procedure that did next to nothing. It just changed the size of the database and Access must have changed something because it was operational again. I quickly did a backup.
 
I tried doing a File-Get External Data-Import, but it gives me the same unexpected state error. To recover the tables and queries I used code that was on the MS site.
 
Skie,

I saw the email below on another forum I'm on.
I did not hear if there was any followup but here is some info that may be useful to you.

Email from AccessD:
-------------------------------
-----Original Message-----
From: accessd-bounces@databaseadvisors.com [mailto:accessd-bounces@databaseadvisors.com] On Behalf Of Tina Norris Fields
Sent: Saturday, March 15, 2008 7:53 AM
To: 'Access Developers discussion and problem solving'
Subject: Software to repair corrupt database

Hi All,

A local organization has a nice database of donors, members, and similar
stuff. It was probably first crafted in A97. I did not build it, but
know the developer who did (he's a very talented guy who keeps
disappearing). The organization has the database on a small server with
three or four computers having access to the database. The database is
not split into BE and FE, it is simply shared. The computers used for
accessing the database are of different operating systems, of course,
ranging from Win98 to WinXP.

The Win98 machine was being used to run a mail merge acknowledgement
letter in Word that is populated by a parameter select query in the
database. The Win98 machine choked and froze. The database was
unusable after that. The message received whenever one tried to open it
was "<database file> isn't an index in this table. Look in the indexes
collection of the TableDef object to determine the valid index names."
Clear case of corruption!

I had been working to fix a wrecked mail-merge document, so was present
when the system froze. I asked about the most recent backup and was
told that they had no idea how the backup was done, but their network
guru said it was done automatically. Great! say I, get the backup from
Jim and we will go back to the mail-merge. Well, they would have to
call Jim. . . . A week later, I had heard nothing back from them so I
called. Well, Jim said the whole system is automatically backed up, but
he can't just get the Access database out for them. Jim and his group
have been trying to repair the database, but they haven't succeeded.

Meanwhile, I've been out looking for software to repair corrupted Access
databases, and I've found a couple that let me run a demo for free, but
will cost about $300 USD to actually get the output file. They are:
Advanced Access Repair from Data Numen Inc. and AccessFIX from
Cimaware. They appear to work, although AccessFIX demo indicated that
part of the structure couldn't be determined without a copy to compare
to. (That would not be awfully difficult, because whenever I visit this
organization I make a backup copy of the database, so the dated copy I
made in October of 2006 is still there.) The $300 USD price-tag is a
bit stiff.

I found a repair service at corruptfilerepair.com. I sent them the
zipped corrupt database, and they have sent me an email with a
screen-shot of the repaired database, showing the tables container and
one of the tables open. If I am satisfied, they will send me a payment
link and I will pay them $39 USD and they will send back the repaired
database. This price seems reasonable, and I am willing to pay that
much to get my friends back up and running.

For the future, I would like to have in my own possession a decent
utility for repairing corrupt databases. What can you, my favorite team
of real gurus, tell me about such software?

Thanks for all help,
Tina

--
AccessD mailing list
AccessD@databaseadvisors.com
Website: ___________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top