A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

auto number



 
 
Thread Tools Display Modes
  #1  
Old December 11th, 2007, 08:20 PM posted to microsoft.public.access.tablesdbdesign
ABRAHAM GOLDSTEIN
external usenet poster
 
Posts: 4
Default auto number

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


  #2  
Old December 11th, 2007, 09:14 PM posted to microsoft.public.access.tablesdbdesign
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default auto number

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.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"ABRAHAM GOLDSTEIN" wrote:

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

  #3  
Old December 12th, 2007, 10:39 AM posted to microsoft.public.access.tablesdbdesign
Jamie Collins
external usenet poster
 
Posts: 1,705
Default auto number

On Dec 11, 7:20 pm, "ABRAHAM GOLDSTEIN"
wrote:
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.

--

  #4  
Old December 12th, 2007, 10:49 AM posted to microsoft.public.access.tablesdbdesign
Jamie Collins
external usenet poster
 
Posts: 1,705
Default auto number

On Dec 11, 8:14 pm, Jerry Whittle
wrote:
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.

--

  #5  
Old December 12th, 2007, 06:53 PM posted to microsoft.public.access.tablesdbdesign
ABRAHAM GOLDSTEIN
external usenet poster
 
Posts: 4
Default auto number

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


"Jamie Collins" wrote in message
...
On Dec 11, 7:20 pm, "ABRAHAM GOLDSTEIN"
wrote:
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.

--



  #6  
Old December 15th, 2007, 03:31 AM posted to microsoft.public.access.tablesdbdesign
boblarson
external usenet poster
 
Posts: 886
Default auto number

Here's a good article for you (by Richard Hunt, PhD):

http://www.access-programmers.co.uk/...d.php?t=128935
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.


"ABRAHAM GOLDSTEIN" wrote:

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


"Jamie Collins" wrote in message
...
On Dec 11, 7:20 pm, "ABRAHAM GOLDSTEIN"
wrote:
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.

--




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.