Subject Re: Correct Way?
Author Peter
--- In, Helen Borrie <helebor@t...>

> Yes: get the generator value BEFORE it is to be used. Generators
> outside of all transaction contexts and a value can not be generated
> twice. Depending on how your application interface works, you can
do this
> one of two ways, both simple:

I am curious.

In a multi user environment where a generator generates a two or more
values (for two or more separate transactions), if a prior value is
rolled back, leaving a later value in use in the table (thinking along
the lines of value 1, 2, 3 etc). Would (could?) the genrerator reuse
ie regenerate a now missing ie unused value.

For example...

user 1 begins a transaction and is issued value 101 by the generator.
user 2 begins a transaction and is issued value 102 by the generator.
user 3 begins a transaction and is issued value 103 by the generator.

If user 3 commits value 103, then user 1 rolls back the transaction
effectively not using value 101, would the generator "know" that it
can use value 101 and use it before generating value 104?, or does all
of this only operate on an incremental basis?

Perhaps this is dependant on user needs?

Kind regards