| | |
|
|
|
autonumber weirdness--help |
| message from Xenophobe on 08 May 2004 |
I have a table with a unique autonumber ID column. The table contains about
1000 records. Recently the autonumber column value got changed to something
less than the highest value. This generates a runtime error when attempting
to insert a new record because the ID column value must be unique.
How could this have happened? Any comments or insight would be greatly
appreciated.
Thanks.
|
| Joseph Meehan replied to Xenophobe on 08 May 2004 |
Try a repair and compact. That may fix it.
Are you using that field as a link to any other table? If not, you can
delete it, do a repair and compact, then add a new field.
Remember that autonumber does not provide consecutive numbers. Auto
number is designed the add unique numbers. Most, but not all, the time they
are consecutive.
Tell us more about this "..the autonumber column value got changed to
something less than the highest value .." What exactly happened and how?
|
| Xenophobe replied to Joseph Meehan on 09 May 2004 |
Joseph,
Thanks for your reply.
The autonumbers were indeed duplicates. It was trying to insert numbers
starting with 321. The errors would continue with 322, 323 and 324. All
already exist. Success was finally achieved with 325, which didn't exist
(available mostly likely from an earlier deletion.) Bottom line is the
numbers don't need to be consecutive, just unique.
I believe the problem might be solved with the service pack indicated in
Van's message. However, I'm going to adjust the current number to something
above the highest number just to be safe.
"Joseph Meehan" <sligojoeS_PAM_2@hotmail.com> wrote in message
news:GVdnc.109654$Vp5.15479@fe2.columbus.rr.com...
|
| Joseph Meehan replied to Xenophobe on 09 May 2004 |
Do add the service pack. Don't try expect autonumber to be adjustable
to anything other than unique. ("I'm going to adjust the current number to
something above the highest number just to be safe") Just let it do its own
thing keeping things unique.
|
| Xenophobe replied to Joseph Meehan on 09 May 2004 |
Joseph,
I installed the Jet service pack, but unfortunately that didn't fix the
current problem. I went ahead and changed the autonumber value (using a
procedure found elsewhere) and now new records are inserted successfully.
Hopefully the service pack will prevent any future related problems.
"Joseph Meehan" <sligojoeS_PAM_2@hotmail.com> wrote in message
news:jYhnc.110442$Vp5.29939@fe2.columbus.rr.com...
|
| Joseph Meehan replied to Xenophobe on 09 May 2004 |
That was my take on the recommendation. I did not expect it to fix what
already be there.
|
| Xenophobe replied to Van T. Dinh on 09 May 2004 |
Van,
Thanks for the heads-up!
"Van T. Dinh" <VanThien.Dinh@discussions.microsoft.com> wrote in message
news:%239XlzxVNEHA.1348@TK2MSFTNGP12.phx.gbl...
|
|
Archived message: autonumber weirdness--help (Microsoft Access Forms)