The easiest approach is to pre-populate the table with data.  That way you
can have absolute control over consecutively numbered PK values.  When a
user wants to add (claim) the next available row UPDATE a flag field (which
has a DEFAULT value "New") with the user's login id.  Then, if the user
successfully updated their user login id, you can UPDATE the remaining
columns of the table and set the flag column to "Done"..

Steve

----- Original Message ----- 
From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 07, 2004 11:45 AM
Subject: [RBASE-L] - Consecutive numbering


> Usually I just use autonumber columns and don't worry
> about missing values (in the event a user deletes a
> row).  Now I need to write an application that
> consecutively numbers records (no gaps in the
> sequence).  I also have an autonumber field to use as
> the PK.
>
> My inclination is to handle the numbering in an ON
> AFERT INSERT trigger, using the NEXT function against
> a "dummy" autonumber table to get the value.
>
> Does anyone have any thoughts or other suggestions on
> how to handle this task?
> --
> Larry
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>

Reply via email to