Subject | Re: Knowing the recent value of a generator |
---|---|
Author | Adam |
Post date | 2005-05-23T03:13:31Z |
Small correction:
As you have identified, there is a chance (probably a small chance
but potentially a very bad scenario) that if there are multiple
users, then you can not be sure that the "SELECT GEN_ID
(TABLE1_GEN_CODE1,0) FROM TABLE1" will return the last generator
value YOU queried.
Should read
As you have identified, there is a chance (probably a small chance
but potentially a very bad scenario) that if there are multiple
transactions, then you can not be sure that the "SELECT GEN_ID
(TABLE1_GEN_CODE1,0) FROM TABLE1" will return the last generator
value YOU queried.
Another transaction can even cause this, you are not even safe if you
only have one user. I suppose if you only ever have one transaction,
one user it would work ok, but it is not a very good way to go
considering how simple the fix is.
Adam
As you have identified, there is a chance (probably a small chance
but potentially a very bad scenario) that if there are multiple
users, then you can not be sure that the "SELECT GEN_ID
(TABLE1_GEN_CODE1,0) FROM TABLE1" will return the last generator
value YOU queried.
Should read
As you have identified, there is a chance (probably a small chance
but potentially a very bad scenario) that if there are multiple
transactions, then you can not be sure that the "SELECT GEN_ID
(TABLE1_GEN_CODE1,0) FROM TABLE1" will return the last generator
value YOU queried.
Another transaction can even cause this, you are not even safe if you
only have one user. I suppose if you only ever have one transaction,
one user it would work ok, but it is not a very good way to go
considering how simple the fix is.
Adam