Subject | Re: [firebird-support] How to implement sequential IDs with no missing vals? |
---|---|
Author | Marvin Cook |
Post date | 2005-03-18T03:00:46Z |
This is not perfect, but I peek at the generator and display that
number. Most of the time, it is the one actually used. When the
transaction is committed, I use the generator to get the real number.
Does not absolutely guarantee no number is skipped but has worked
acceptably for a long time.
Marv
number. Most of the time, it is the one actually used. When the
transaction is committed, I use the generator to get the real number.
Does not absolutely guarantee no number is skipped but has worked
acceptably for a long time.
Marv
On Thu, 17 Mar 2005 14:55:28 -0600, Clay Shannon <cshannon@...> wrote:
> We want sequential "admission numbers" in our app to be auto-generated for
> the user (they need to see them, but getting the next sequential value
> automatically rather than relying on the data entry people to always
> accurately know what the next one should be).
>
>
>
> A generator won't work, I don't think, because we don't want any missing
> values. IOW, if the user starts a record, and gets number 123445 and then
> for some reason doesn't complete the record, that number will be unused and
> there will be a hole in the sequencing.
>
>
>
> If I could wait until just before the post to grab the number, that would
> probably solve it, but again, the user wants to see this number all through
> the data-entry process.
>
>
>
> Any ideas on the best way to implement something like this? The best thing
> I've been able to think of so far is to select max(admission_number) from
> the table and use the next number through the data-entry process, but query
> for that value again just before posting and, if it has changed, increment
> the number again and inform the user of the numbering change. There must be
> a better way, though.
>
>
>
> Clay Shannon,
>
> Dimension 4 Software
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.