[AccessD] AutoNumber To Start From 900120

Brett Barabash BBarabash at TappeConstruction.com
Thu May 6 09:12:46 CDT 2004


I had a coworker who used autonumber fields in a few of his temp tables, who
actually used DAO code to remove and re-add the field to his table.

When I asked him why, he told me that he needed to reset the autonumber so
he doesn't reach the upper limit (2,147,483,647).  I told him that he needed
to brush up on his math skills; that apparently he had no concept of how
much a billion was.

Last I heard, he was pursuing a career in politics ;-)


-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, May 06, 2004 9:01 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] AutoNumber To Start From 900120


>if some specific value of an AutoNumber field is important then the
AutoNumber field is not being used properly (this is an old hobby horse of
mine).

Amen.

OTOH I have had to "reset" the autonumber many times, to a value larger than
the last one used, because something as happened to reset the autonumber
back down to an invalid value.  I was simply answering the question.  I
figured I'd leave the soap box to someone else for once.  ;-)

John W. Colby
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Heenan,
Lambert
Sent: Thursday, May 06, 2004 9:42 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] AutoNumber To Start From 900120


Quite a few replies to this question, but I'm surprised that nobody has
mentioned that if some specific value of an AutoNumber field is important
then the AutoNumber field is not being used properly (this is an old hobby
horse of mine).

An AutoNumber field is supposed to uniquely identify a specific row in a
table. That's all. The user's need not ever see or know the value of such an
AutoNumber field, it's used by the database to link related tables together.
If the value of an AutoNumber field is important to a user then it is being
given some other meaning, and that's only going to cause problems down the
line. In effect you are storing two pieces of information in one field, and
that's contrary to the normalization principals we should all at least be
aware of.

Even Microsoft seem to have woken up to this as A2K+ no longer reset
AutoNumber's on compacting (thanks for testing that John).

Just my 2 cents.

Lambert

> -----Original Message-----
> From:	Jim Hewson [SMTP:JHewson at karta.com]
> Sent:	Thursday, May 06, 2004 9:22 AM
> To:	Access Developers discussion and problem solving
> Subject:	RE: [AccessD] Autonumber To Start From 900120
>
>
> Issue?  I thought that was feature.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby
> Sent: Thursday, May 06, 2004 8:23 AM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Autonumber To Start From 900120
>
>
> Uhh... yep.  At least in A2K and earlier.  AXP doesn't seem to do that.
> In
> fact I just tested in A2K SR1 and it isn't resetting the autonumber
> either,
> so a service pack may have fixed that.  But it definitely used to be an
> issue so be careful.
>
> John W. Colby
> www.ColbyConsulting.com
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco
> Sent: Thursday, May 06, 2004 8:47 AM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Autonumber To Start From 900120
>
>
> Yes this will work.  One caveat though: do not compact the db until you've
> got the seed number you want inserted.  Compacting will reset the
> autonumber.
>
> Jim DeMarco
>
> -----Original Message-----
> From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
> Sent: Thursday, May 06, 2004 8:45 AM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Autonumber To Start From 900120
>
>
> One way that works with all versions of Access (AFAIK) is to append in a
> dummy record specifying a value one less than the number you want.  Then
> go
> in and delete that record.  The next record will pick up with the next
> value
> (assuming an incrementing autonumber)
>
> John W. Colby
> www.ColbyConsulting.com
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of
> paul.hartland at fsmail.net
> Sent: Thursday, May 06, 2004 8:25 AM
> To: accessd
> Subject: [AccessD] Autonumber To Start From 900120
>
>
> To all,
> Is there a way of telling the Autonumber where to start from in a Database
> ?
> Thanks in advance.
> Paul
>
> --

--------------------------------------------------------------------------------------------------------------------
The information in this email may contain confidential information that 
is legally privileged. The information is only for the use of the intended 
recipient(s) named above. If you are not the intended recipient(s), you 
are hereby notified that any disclosure, copying, distribution, or the taking 
of any action in regard to the content of this email is strictly prohibited.  If 
transmission is incorrect, unclear, or incomplete, please notify the sender 
immediately. The authorized recipient(s) of this information is/are prohibited 
from disclosing this information to any other party and is/are required to 
destroy the information after its stated need has been fulfilled.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Tappe Construction Co.

This footer also confirms that this email message has been scanned
for the presence of computer viruses.Scanning of this message and
addition of this footer is performed by SurfControl E-mail Filter software
in conjunction with virus detection software.




More information about the AccessD mailing list