Autonumber is Not Unique

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Todd Matson

    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


  • Lyle Fairfield

    #2
    Re: Autonumber is Not Unique

    "Todd Matson" <v@x.z> wrote in news:jtchc.1099 7$c%3.1988@okep read02:
    [color=blue]
    > http://MatsonConsulting.com/download...number_bug.zip[/color]

    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)

    Comment

    • Todd Matson

      #3
      Re: Autonumber is Not Unique

      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" <MissingAddress @Invalid.Com> wrote in message
      news:Xns94D185B 66B221FFDBA@130 .133.1.4...[color=blue]
      > "Todd Matson" <v@x.z> wrote in news:jtchc.1099 7$c%3.1988@okep read02:
      >[color=green]
      > > http://MatsonConsulting.com/download...number_bug.zip[/color]
      >
      > My idea is that the table is corrupted, either by misadventure or[/color]
      adventure[color=blue]
      > adventure. Once copied, the table is fine and autonumber works perfectly[/color]
      as[color=blue]
      > it has always done for me for 12 or so years.
      >
      > --
      > Lyle
      > (for e-mail refer to http://ffdba.com/contacts.htm)[/color]


      Comment

      • Dimitri Furman

        #4
        Re: Autonumber is Not Unique

        On Apr 20 2004, 12:46 pm, "Todd Matson" <v@x.z> wrote in
        news:jtchc.1099 7$c%3.1988@okep read02:
        [color=blue]
        > 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.[/color]

        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

        Comment

        • Tom van Stiphout

          #5
          Re: Autonumber is Not Unique

          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.Connectio n object to
          ensure a certain version of ADO is installed.

          -Tom.

          <clip>[color=blue]
          >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[/color]
          <clip>

          Comment

          Working...