Corrupt Database

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a corrupt table with some 130,000 rows and have followed the advice
below - ie created a copy of the table and imported the records (other than
the bad ones)

My question now is how to handle the AutoNumber field - if I import the data
with the field set as autonumber I obviously get the wrong numbers where
there are rows that have been deleted.

Thanks

Dave


Create a copy of the table, and import all the other records, without
referring to the bad one.
Details in the 3rd symptom of this article:
Recovering from corruption


Allen Browne - Microsoft MVP. Perth, Western Australia.



message.
Access exits.
the probllem
error and it also exits
 
My question now is how to handle the AutoNumber field - if I import the data
with the field set as autonumber I obviously get the wrong numbers where
there are rows that have been deleted.

Not necessarily. If you use an Append query, and append ALL of the
fields including the autonumber, then the value in the original table
will be faithfully reflected in the new one.

Of course there will be gaps (where you didn't import a record) - but
that's what you WANT. If you expect autonumbers to be gapless and
sequential, your expectation is WRONG.

John W. Vinson[MVP]
 
Dave said:
I have a corrupt table with some 130,000 rows and have followed the
advice below - ie created a copy of the table and imported the
records (other than the bad ones)

My question now is how to handle the AutoNumber field - if I import
the data with the field set as autonumber I obviously get the wrong
numbers where there are rows that have been deleted.

Thanks

Dave

Let me add my opinion that using autonumber where someone will see the
numbers and especially when you want to put some significant meaning to the
numbers is wrong. Autonumbers are designed to create unique numbers only
and should never be counted on to provide sequential numbers.
 
Thanks Joseph

Yes I agree - but unfortunately this is a database that I have inherited
from another developer

Dave
 
Hi John

Thanks for your reply - are you suggesting the data to the new table with
the field that is the ID set to an Autonumber or to a Long Integer?

Dave
 
Hi John

Thanks for your reply - are you suggesting the data to the new table with
the field that is the ID set to an Autonumber or to a Long Integer?

Dave

Whichever you prefer as the eventual datatype of the ID. Both will
work.

John W. Vinson[MVP]
 

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

Back
Top