HELP! "The database....needs to be repaired"

G

Guest

What is this message:

The database 'c:\database.mdb' needs to be repaired or isn't a database file.

You or another user may have unexpectedly quite Microsoft Access while a
Microsoft Access database was open. Do you want Microsoft Access to attempt
to repair the database?


I've had two or three times this morning. I have compacted and repaired.

Can someone shed some light on this?

Cheers.
 
J

John W. Vinson

What is this message:

The database 'c:\database.mdb' needs to be repaired or isn't a database file.

You or another user may have unexpectedly quite Microsoft Access while a
Microsoft Access database was open. Do you want Microsoft Access to attempt
to repair the database?


I've had two or three times this morning. I have compacted and repaired.

Can someone shed some light on this?

Cheers.

http://www.granite.ab.ca/access/corruptmdbs.htm

John W. Vinson [MVP]
 
G

Guest

That page didn't really help too much though I guessed what the problem
might be.

So what I have done is import all the elements of the database into a new
one. The memory size has halved (which I assume is a good sign).

I now have a new problem. I have the "workingdays" module that calculates
the difference in days excluding weekends and holidays. I am getting a
"user-defined type" error for the following line:

Dim rst as DAO.recordset


Any ideas? thanks


--

The 11th day of every month:

http://truthaction.org/forum/index.php
 
D

Douglas J. Steele

Sounds as though you're using Access 2000 or Access 2002, which doesn't
include the reference to the DAO library by default.

Open the VB Editor, select Tools | References from the menu, scroll through
the list of available references until you find the one for Microsoft DAO
3.6 Object Library, select it then click OK

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)
 
T

Tony Toews [MVP]

scubadiver said:
That page didn't really help too much though I guessed what the problem
might be.

How could those pages have helped better?

What was the problem?

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
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

scubadiver said:
There is a lot on symptoms but not such a great deal on how to resolve them
(unless I missed something somewhere).

No, there isn't a lot that can be done to repair a database.
Everything that I know of, and everything that I've read in the
newsgroups is on that page.
I've sorted out my problem anyway.

Good.

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
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
G

Guest

I thought I solved my problem. I decided to transfer everything into a new
database but the error message is still occurring.

I don't know what to do.
 
J

John W. Vinson

I thought I solved my problem. I decided to transfer everything into a new
database but the error message is still occurring.

Almost surely, one form or report is corrupt.

Try importing in stages, making a backup after EACH STAGE. Import all the
tables and queries; test. Then import any macros; test. Then import all your
modules (if any); open the VBA editor, choose Debug... Compile <my database>;
correct any errors and compile again; compact.

Then start importing forms and reports, one by one (or a very few at a time).
Compact after each import and check for corruption. If you find that importing
frmMyNeatForm causes corruption to appear, go back to the previous backup,
import the *other* forms (but obviously not frmMyNeatForm). If frmMyNeatForm
is the only corrupt object, just rebuild it from scratch.

John W. Vinson [MVP]
 
G

Guest

We have jetcomp and there was an error when it tried to compact into a blank
database. I contacted our company IT service desk.

How can I test after importing the tables and queries?
 
J

John W. Vinson

We have jetcomp and there was an error when it tried to compact into a blank
database. I contacted our company IT service desk.

How can I test after importing the tables and queries?

Run JetComp would be one way.

John W. Vinson [MVP]
 
G

Guest

I copied the database and kept only the tables and queries. I used jetcomp
and there was a compacting error. I then decided to reduce the database to
the main table and there is still an error.

I have looked in the records and there is nothing to suggest that any of
them have corrupted. What else could it be?
 
G

Guest

I have used JetComp on the tables, queries and forms separately and a
compact error arises for each. I think I have major problems!
 
G

Guest

I have used JetComp on the tables, queries and forms separately and a
compact error arises for each. I think I have major problems!
 
J

John W. Vinson

The IT desk have suggested splitting the db (which I thought of last night)

Won't help if there's a corrupt table. You may need to import one table at a
time.

It's not the only possibility, but one frequent source of corruption problems
is a Memo field. If the tables aren't too huge, try scrolling through them in
table datasheet view looking for oddities in the contents of a memo field:
gibberish data, #Error#, Chinese symbols, etc. You may be able to salvage the
rest of the table by creating a new table in a new .mdb, linking to this
table, and running one or more append queries to append the undamaged records.

John W. Vinson [MVP]
 
T

Tony Toews [MVP]

John W. Vinson said:
It's not the only possibility, but one frequent source of corruption problems
is a Memo field. If the tables aren't too huge, try scrolling through them in
table datasheet view looking for oddities in the contents of a memo field:
gibberish data, #Error#, Chinese symbols, etc. You may be able to salvage the
rest of the table by creating a new table in a new .mdb, linking to this
table, and running one or more append queries to append the undamaged records.

Or once you get to the screen that has a corrupt memo field may cause
Access to puke and die.

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
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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