[AccessD] Unused numbers?

Chris Kettenbach chris at piasd.org
Tue Nov 9 11:18:57 CST 2004


I think something like this has happened.  Is there anyway to start it over from the largest value.  When users were trying to add new records, it was trying to create duplicate values.  I had to go in and use an SQL INSERT.  I first did a SELECT Max(NumID) then I did an INSERT with 1+that value.  Should the counter begin counting from there now?  I hope that corrected the problem.  Only way I guess is to try adding a new record.  Thanks all.
CK

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Colby, John
Sent: Tuesday, November 09, 2004 9:02 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Unused numbers?


>Maybe it's more trouble than it's worth. 

And a bad idea.

Do you use an autonumber?  If so there is no reusing the old numbers.  If
you try you will reset the counter and the next time the autonumber is used
it will collide with values already in the table.

Further they are a long integer capable of handling +/- 4 billion values, so
why worry about it?

John W. Colby
The DIS Database Guy


-----Original Message-----
From: Chris Kettenbach [mailto:chris at piasd.org]
Sent: Tuesday, November 09, 2004 11:39 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Unused numbers?


I have an autonumber table of like 13000 records.  Does anyone have any
sample code to loop through the primary key field and find the numbers that
are missing?  Basically reuse old primary keys of deleted records. Maybe
it's more trouble than it's worth. Thanks All!!
CK
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list