auto number

  • Thread starter Thread starter ABRAHAM GOLDSTEIN
  • Start date Start date
A

ABRAHAM GOLDSTEIN

run access 2003 works fine.while synching one of the files to the palm
it looks like the auto numbers has gotten corrupt. the last 2 numbers where
665-666.
and all of sudden 98176657-98176658. on the desktop
where did all does numbers come from and how can i correct that file.

ps. while synching i always make sure that desktop overrides palm.

any info will be greatly appreciated
sincerely Abraham
 
Are you using replication? If so it changes the primary keys to larger numbers.

If you are using autonumbers that have "meaning" such as being sequential,
you are misusing autonumbers. The only purpose of an autonumber is to be
unique when used as the primary key in a table.
 
run access 2003 works fine.while synching one of the files to the palm
it looks like the auto numbers has gotten corrupt. the last 2 numbers where
665-666.
and all of sudden 98176657-98176658. on the desktop

If you are concerned about duplicates then put a unique constraint on
the Autonumber column; if you think you already have a unique
constraint then double check because there is/has been a bug in Access
where the unique constraint (or is/was is just PRIMARY KEY?) gets
dropped.

You should be unconcerned about the actual values generated; even if
the sequence has skipped 10 million values there will remain more
available values than you could ever use. If you are concerned about
actual values then it is likely you have a design flaw e.g. exposing
Autonumber values to users.

Jamie.

--
 
The only purpose of an autonumber is to be
unique when used as the primary key in a table.

FWIW I don't think that is correct. The purpose of Autonumber is auto-
generate a value according to an algorithm (increment, random or --
extrapolating slightly -- GUID).

There is nothing inherent about Autonumber that guarantees uniqueness
(even for GUIDs!) If you want uniqueness then you have to maintain a
unique constraint on it.

There is no requirement to use the PRIMARY KEY designation for a table
at all, let alone use it on the Autonumber column where one exists.

Jamie.

--
 
actually let me rephrase.
i'm talking about "id primary key" and as such its usually comes with
increments.
and there the problem began instead of continuing 666-667-668. it started
98176657-98176658 instead.
and im wondering if there is a way to fix it. but i guess you are trying to
tell me that i shouldn't be
concerned about the primary key number i hope i understood
Abraham
 
Back
Top