Strange autonumber behaviour after replication?

  • Thread starter Thread starter John
  • Start date Start date
J

John

I recently decided to update my Access 2000 database while on the move, so I
set it up for replication between my laptop and desktop. Everything works
fine, but I've noticed the autonumber fields that I'm using for Primary Keys
in the tables now seem to take random sometimes negative values. Is this
normal behaviour. I thought at first they might be temporary until
syncronization, but they're still the same after I syncronized the two mdb
files.
I have a backup of the original database, but I don't want to find problems
in two or three weeks time because of this.

Any help/advice on this appreciated

John
 
I recently decided to update my Access 2000 database while on the move, so I
set it up for replication between my laptop and desktop. Everything works
fine, but I've noticed the autonumber fields that I'm using for Primary Keys
in the tables now seem to take random sometimes negative values. Is this
normal behaviour. I thought at first they might be temporary until
syncronization, but they're still the same after I syncronized the two mdb
files.
I have a backup of the original database, but I don't want to find problems
in two or three weeks time because of this.

This is indeed expected behavior. Replication changes all autonumber
fields to Random. This is necessary; if you had two people entering
data on two replicas, they could not both assign sequential
autonumbers because they'd be certain to be the same in the two
replicas! The Random number has four billion odd possibilities, so
it's less likely (but not impossible) that both users would assign the
same number. You also get the choice of making them GUID's, which are
essentially certain to not have duplicates.

This is one of many reasons that Autonumbers should be used only
"behind the curtain", as meaningless identifiers and linking fields,
and should not be displayed to users.

John W. Vinson[MVP]
 
Back
Top