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  

Annoying Autonumber bug



 
 
Thread Tools Display Modes
  #1  
Old September 28th, 2006, 06:56 PM posted to microsoft.public.access.tablesdbdesign
Ray Cacciatore
external usenet poster
 
Posts: 57
Default Annoying Autonumber bug

There's a bug in Access where the Autonumber reuses old numbers as the
primary key. According to Microsoft, this bug was supposed to be fixed in the
latest Jet version...Not!
Apparently, every time you compact your database, some tables may reuse old
numbers as the value in your Autonumber field. Now, my users get "Duplicate
values" error when they add records in a table.

Help!

  #2  
Old September 28th, 2006, 07:59 PM posted to microsoft.public.access.tablesdbdesign
Craig Hornish
external usenet poster
 
Posts: 43
Default Annoying Autonumber bug

Well in my version it works - but it does reset if you delete all the
records - I'll let others confirm versions and service pacts you need.

But my thought on this is that the Error you gave is not possible given the
limited information you provided.
Assuming autonumber field is Primary as you say - it can't duplicate
numbers. If an old number is reused then worst case is it will return false
data in other tables where it is used as a foriegn key. And you have a
bigger problem with orphaned records.

I could be missing something and if anybody could provide the situation
where this is possible as Ray has discribed I would be interested.
--
Craig Hornish

Visit weekly Access conferences
Tuesday, 11:00am-12:30pm (Eastern US)
Thursday, 3:30pm- 5:00pm (Eastern US)

http://community.compuserve.com/n/pf...g=ws-msdevapps

"Think outside the box, because anything is possible."
"How long it will take or whether it requires divine intervention is another
issue"

"Ray Cacciatore" wrote in message
...
There's a bug in Access where the Autonumber reuses old numbers as the
primary key. According to Microsoft, this bug was supposed to be fixed in
the
latest Jet version...Not!
Apparently, every time you compact your database, some tables may reuse
old
numbers as the value in your Autonumber field. Now, my users get
"Duplicate
values" error when they add records in a table.

Help!



  #3  
Old September 29th, 2006, 12:09 AM posted to microsoft.public.access.tablesdbdesign
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default Annoying Autonumber bug

Hi Ray,

I have seen this problem, even though I have the latest service pack (SP-8)
for the JET database engine. The database in question was created with an
older version of the JET, which was suseptible to this problem. In order to
fix the problem, I had to delete the autonumber field, compact the database,
and then create a new field.

If you have related tables that are child to this table, then you will need
to create a new empty table (you can copy the structure only of your existing
table), and then run an append query to append the data from the affected
table to your new table. You can append to an autonumber field, and it should
accept the value, as long as it has not already been used.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/ex...tributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________


"Ray Cacciatore" wrote:

There's a bug in Access where the Autonumber reuses old numbers as the
primary key. According to Microsoft, this bug was supposed to be fixed in the
latest Jet version...Not!
Apparently, every time you compact your database, some tables may reuse old
numbers as the value in your Autonumber field. Now, my users get "Duplicate
values" error when they add records in a table.

Help!

 




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 04:04 PM.


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