Database corruption problem

A

advance scout

HELP! My database is suddenly corrupted. My computer was acting funny
(very sluggish) and was shut down. Access had been already been closed down
but computer was acting very slow , so perhaps it was still open. I am now
getting a "The data base ... is corrupted and needs to be repaired" error .
I have made copies of the corrupted database so that I could try to repair
and still have a corrupted copy available. When I try to repair , it says
that it has repaired the file successfully but then it comes up as an
automation error. Then when I try to restart the "repaired " database-
Access crashes.

Also in the directory I have a file with a .ldb extension... so apparently
that wasnt deleted as the program got corrupted.

PLEASE HELP ... ANY IDEAS???
 
J

John Vinson

HELP! My database is suddenly corrupted. My computer was acting funny
(very sluggish) and was shut down.

Have you run a *competent* virus and malware scan?
Access had been already been closed down
but computer was acting very slow , so perhaps it was still open.

That could certainly do it.
I am now
getting a "The data base ... is corrupted and needs to be repaired" error .
I have made copies of the corrupted database so that I could try to repair
and still have a corrupted copy available. When I try to repair , it says
that it has repaired the file successfully but then it comes up as an
automation error. Then when I try to restart the "repaired " database-
Access crashes.

Also in the directory I have a file with a .ldb extension... so apparently
that wasnt deleted as the program got corrupted.

PLEASE HELP ... ANY IDEAS???

First - get AVG, or McAfee, or <yuck> Norton Antivirus, or SOME good
antivirus program and make sure your computer isn't infected with a
virus. Then get a good spyware program (AdAware, Spybot, or both) and
make sure you don't have some spyware program.

Then check out the suggestions at
http://www.granite.ab.ca/access/corruptmdbs.htm

You may need to restore this database from a functional backup
(hopefully you have one :-{( ) or recreate it. Databases are NOT
immortal.

John W. Vinson[MVP]
 
A

advance scout

Hi John-

No Virus-

when I run the repair it says its repaired .. but it stops as its trying to
run the switchboard script - I get an "automation error".

When I go into tables ... all my tables are there with the data ...HURRAY!
So the data is there but I am getting an automation error after the repair.

All my OLD access databases are working but they are old data (havent backed
up in a about a month)... and those scripts are still working...

So something is happening in the repair to give me an "automation error " on
the switchboard.
 
A

advance scout

the exact error is " Compile error: automation error"

So the question is why would I get this error after the database has been
repaired? Since the data is all there once this is fixed I will have a
working database. I have tried compiling... to no avail.
 
J

John Vinson

the exact error is " Compile error: automation error"

So the question is why would I get this error after the database has been
repaired? Since the data is all there once this is fixed I will have a
working database. I have tried compiling... to no avail.

Repair isn't foolproof.

Again... check the suggestions on Tony's website. He has some
suggestions (and links to other sites) with ways to repair databases
that the builtin Access repair tool can't. One place to start would be
to create a new, empty database; link to your tables (I hope this is a
split application with a backend of tables and a frontend of
everything else); and Import all the forms, reports, etc. Type Ctrl-G
to open the VBA editor and select Debug...Compile.


John W. Vinson[MVP]
 
A

advance scout

John Vinson said:
Repair isn't foolproof.

Again... check the suggestions on Tony's website. He has some
suggestions (and links to other sites) with ways to repair databases
that the builtin Access repair tool can't. One place to start would be
to create a new, empty database; link to your tables (I hope this is a
split application with a backend of tables and a frontend of
everything else);
No, its not ;(

I do have a working version of the database from about two months ago. The
only thing that would have changed are the tables. so can I split the old
database ? and if so how do i do that?

Thanks for your help.


and Import all the forms, reports, etc. Type Ctrl-G
 
J

John Vinson

I do have a working version of the database from about two months ago. The
only thing that would have changed are the tables. so can I split the old
database ? and if so how do i do that?

You're in luck. Back up this two-month old database AND your current
database.

I'd suggest manually doing the split, rather than using the splitter
wizard.

You can do so by doing the following steps:

Take your working two-month old database (you DID back it up...
right!?), take a deep breath, and delete all the tables. Compact it.

Create a new, empty database. Be sure to set the Options so that Name
Autocorrect is off (it's buggy). Then use File... Get External Data...
Import and import all the tables (with the current up to date data)
from your current database, the corrupt one. Compact this. Name it
whatever you like, but if your database is named RALPH.MDB, you might
want to name it RALPH_BE.MDB (_BE for Back End).

Then open the database from which you deleted the tables, and use
File... Get External Data... Link and link to the tables in this newly
created database.

John W. Vinson[MVP]
 
A

advance scout

Thanks John.... BUT.... Something really weird is going on.... It seems
that when I open the old database (remember it was not affected by the
shutdown) i am getting weird errors there too- example the date() function
is missing... all of my reports have question marks where that function is
used... some other global errors too... This is a copy on a CD that should
be totally unaffected but when I copy it to my hard drive and open it I am
getting some strange errors mixed into an otherwise "complete" and working
database. So could my access installation itself have been corrupted in
some way?
 
J

John Vinson

Thanks John.... BUT.... Something really weird is going on.... It seems
that when I open the old database (remember it was not affected by the
shutdown) i am getting weird errors there too- example the date() function
is missing... all of my reports have question marks where that function is
used... some other global errors too...

AHA...

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

The bug can be triggered by the installation of other software
even if it's altogether unrelated to Access.

John W. Vinson[MVP]
 
T

Tony Toews

advance scout said:
the exact error is " Compile error: automation error"

So the question is why would I get this error after the database has been
repaired? Since the data is all there once this is fixed I will have a
working database. I have tried compiling... to no avail.

Interestingly enough a client had a very similar problem with an MDB
he was working in. Fortunately it was the front end and fortunately I
had made a copy at 10 am that morning and it only took a few minutes
to put my updates in it.

What is particularly interesting is that we could compact and repair
the front end just fine. However we were still getting the message
"has detected corruption in the file. To try to repair the corruption
...." I also couldn't get into any code. I could get into form design
view.

So clearly the VBA was somehow corrupted.

From your other postings it sounds like you should be fine as you
stated you can get access to the tables. And you have a two month old
copy of the other objects which is up to date.

One thing you could try is decompiling.
Decompile or how to reduce Microsoft Access MDB/MDE size and decrease
start-up times
http://www.granite.ab.ca/access/decompile.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top