473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Autonumber is Not Unique

I have a table with an autonumber primary key column. When I add a row to
the table, Access is generating a number which is already in use. This makes
my application blow up. Thankfully, the table's uniqueness constraint holds
(i.e. I get an error when I try to save the row), but my entire application
is built on the premise that autonumber values will be unique, and all hell
breaks loose when that premise is violated.

I am using Access 2000, SP3. The problem persists if I compact and repair
the database. I corrected the problem once by rebuilding the primary key
column (i.e. create a new column, delete the old one), but the problem has
reoccurred. I have posted a copy of the database, stripped of all but the
relevant table, at http://MatsonConsulting.com/download...number_bug.zip.
I can recreate the problem at any time (and hopefully you can too) by adding
a row to that table.

To me, this looks a lot like the notorious autonumber reset bug
(http://support.microsoft.com/?id=257408), but I should not be experiencing
that bug with SP3. If anyone has any other ideas, I would be glad to hear
them.
-Todd Matson
Nov 12 '05 #1
4 2110
"Todd Matson" <v@x.z> wrote in news:jtchc.10997$c%3.1988@okepread02:
http://MatsonConsulting.com/download...number_bug.zip


My idea is that the table is corrupted, either by misadventure or adventure
adventure. Once copied, the table is fine and autonumber works perfectly as
it has always done for me for 12 or so years.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #2
Lyle,

Thank you for the reply.

I believe I have found the source of the corruption. I have discovered that
some of my users have a pre-SP1 version of Access. My theory is that these
users managed to break the database with the autonumber bug, so that it
doesn't work even for those users with an up-to-date version of Access.

If my theory is correct, it implies that the pre-SP1 version of Access is
very dangerous, and must be eradicated at all costs. (After browsing the
newsgroup, I have discovered that this is old news, but it never hit home
with me until now.) So, here is a new question: Is there any way to
determine, from code, which service packs have been installed? If so, I will
modify my application so that it refuses to run unless Access is up-to-date.
-Todd Matson
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Todd Matson" <v@x.z> wrote in news:jtchc.10997$c%3.1988@okepread02:
http://MatsonConsulting.com/download...number_bug.zip
My idea is that the table is corrupted, either by misadventure or

adventure adventure. Once copied, the table is fine and autonumber works perfectly as it has always done for me for 12 or so years.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #3
On Apr 20 2004, 12:46 pm, "Todd Matson" <v@x.z> wrote in
news:jtchc.10997$c%3.1988@okepread02:
To me, this looks a lot like the notorious autonumber reset bug
(http://support.microsoft.com/?id=257408), but I should not be
experiencing that bug with SP3.


FWIW, I've seen this bug in a database using Access 2002 file format that
was never touched by anything but Access 2002 SP2. Copy/paste did fix it.

--
remove a 9 to reply by email
Nov 12 '05 #4
On Tue, 20 Apr 2004 13:29:50 -0700, "Todd Matson" <v@x.z> wrote:

Of course. Just check any About box in Access.
The trick is to be able to read the Version information from one of
the Access DLLs such as DAO360.DLL.
Then compare that to the version numbers that are typically documented
in the readme.txt file of any product or upgrade.

Sometimes you get lucky, and the object itself implements a Version
property. I use this all the time with an ADODB.Connection object to
ensure a certain version of ADO is installed.

-Tom.

<clip>
with me until now.) So, here is a new question: Is there any way to
determine, from code, which service packs have been installed? If so, I will
modify my application so that it refuses to run unless Access is up-to-date.
-Todd Matson

<clip>

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Tony Williams | last post by:
I have a table called tblseries with a field NextNumber I also have a form called form1 based on table1 On the form is a control NNum which I've called NNumtxt with the following code in the...
2
by: Charles Robinson III | last post by:
The AutoNumber sequence in my database is currently formatted as '000000'. When a new record is created, the AutoNumber would go from 000001, 000002, 000003 and so on. I want to track via...
33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
35
by: Traci | last post by:
If I have a table with an autonumber primary key and 100 records and I delete the last 50 records, the next record added would have a primary key of 101. Is there any way to have the primary key...
4
by: yf | last post by:
A KB article "http://support.microsoft.com/default.aspx?scid=kb;en-us;209599" tells that the maximum number of records that a table may hold if the PRIMARY key data type is set to AUTONUMBER is...
8
by: mathilda | last post by:
I have a situation where I need to put back in a deleted record to a table whose primary key is an Autonumber. And of course the autonumber has to match what it was before. Any way of saving my...
33
by: Steven Taylor | last post by:
Hope someone can help. This is half an Access question. The half I'm using is Access Xp as a backend data file. I'm using ODBC to connect to the data file. All commands are via SQL type...
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
9
by: Tom_F | last post by:
To comp.databases.ms-access -- I just discovered, to my more than mild dismay, that some tables in my Microsoft Access 2003 database have duplicate numbers in the "AutoNumber" field. (Field...
9
by: Gogo | last post by:
Database has record 59 showing, tabing to enter data returns autonumber to 134. What happened to cause this, how would I fix it?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.