Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006

    Unanswered: abusing autonumber

    Hi - I use autonumber to assign SNs to my coins in a coin collection db. I have since deleted some entries and created "gaps" in the numbering. I could just define a new field with autonumber, but that will throw everything off - after the first gap. Any other strategies to fill in the gaps with new entries?
    Thanks, you all are the best!

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    thats not the way autonumber works
    if you must have a sequential series then you need to implement your own mechanism to get the number, rather than rely on the db to do it for you. The whole purpose of a system generated number is that it has no meqaning outside the system.

    consider using the max() clause in a select statement to find the current highest number.

    if you want to find missing numbers then you need to do some more work
    you need to open a recordset, iterate through each row to find a gap, and return that number.

    If the app is to be used in a multi user environment then you need to do a lot more, to ensure that you dont get more than one user trying to use the same number, by using table locks.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts