By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

Autonumber is Not Unique

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.