autonumber problem (random vs. incremental)

H

Henricus

I have an existing database. For whatever reason (MSA
2000 -> 2002?) the autonumber field type in every table
has changed from 'incremental' to 'random'. Adding a new
record now generates a 10-digit random record number. I
cannot change the field type back to 'incremental'
apparently, so how do I get my database back? "repair"
did not help at all.

THX!
 
A

Alp Bekisoglu

I'm not one of the experts here but sound to me like you are dealing with a
"replica".

The autonumbers goes "random" on such databases.

Not a solution to your problem but thought it might lead you in the right
direction.

Sincerely,

Alp
 
J

John Vinson

I have an existing database. For whatever reason (MSA
2000 -> 2002?) the autonumber field type in every table
has changed from 'incremental' to 'random'. Adding a new
record now generates a 10-digit random record number. I
cannot change the field type back to 'incremental'
apparently, so how do I get my database back? "repair"
did not help at all.

THX!

Alp's right: if you Replicate your database, all autonumbers become
random and you can't unrandom them.

About the only solution would be to create a new database from
scratch, unreplicated with sequential autonumbers; link to this one
and run Append queries appending everything other than the autonumber
field. Related tables which have the autonumber primary key values
entered will require special treatment... not fun!

Basic rule: if you care what value an Autonumber field contains, you
should NOT use Autonumber. An Autonumber's *only* function is to
provide an almost-guaranteed-unique key. It's not warrantied to be
sequential or gapless.
 

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