Great, Thanks!
On Friday, April 29, 2016 10:26 AM, "Gabor Boros [email protected]
[firebird-support]" <[email protected]> wrote:
2016. 04. 28. 21:22 keltezéssel, Ann Harrison [email protected]
[firebird-support] írta:
> Okay... What's the requirement that keeps you from using generators?
I need number generators which give back sequence numbers without
skipping and repeating. But don't know how many needed. The number of
needed generators depend on the customers(X Ltd., Y Ltd, ...). This is
why I want to store the generators in a table.
> Do you intend to grab the number in a transaction that does other work?
The transaction do other work before grab the number and after grab the
number. The whole thing is in a (one) stored procedure. (Works like a
charm except deadlocks.)
> What is the concurrency requirement?
If I understand your question correctly... I don't think will be high
load but I test is because not want to see deadlock in production.
> What you're thinking about doing
> will serialize the generation of identifiers and all other actions of
> those transactions. I'm not totally convinced that using
> ReadCommitted/wait will create an auditable series of numbers in the
> case where a transaction fails.
For testing purposes the test app insert the generated numbers into a
one field table which have a unique constraint. I not see any error
except the deadlocks.
Gabor
------------------------------------
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------
Yahoo Groups Links