View Single Post
  #7  
Old April 29th, 2010, 01:44 AM posted to microsoft.public.access.tablesdbdesign
David W. Fenton
external usenet poster
 
Posts: 3,373
Default What are AutoNumber Dangers

=?Utf-8?B?RnJlZA==?= wrote in
:

When it's said to never show it to the outside world, that's to
guard against anybody ever trying to change one.


Er, what? Autonumbers aren't editable, so there's no danger even
*if* somebody is tempted to change one.

The problem is that people invest MEANING in Autonumber values and
assume they are sequential and have no gaps. An Autonumber is really
just a special type of default value for a Long Integer field (you
can append any value to it you like that doesn't violate an existing
index). It can, in fact, be random (and *is* random in a replicated
Jet database).

The values of an Autonumber field have no meaning. Exposing them to
the user tempts them to invest the values with meaning, and that's
the flaw.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/