Subject "Generators" via table data
Author tdtappe
I would love to hear your opinion on this:

I need to have generators or let's say counters as table data, not
metadata.
Why? Because it depends on how the user sets up my application.
So for example I don't know how many counters I need to have.

So let's assume I have a table that contains all counters and each
counter is referenced by a unique name (primary key).

What would be the best way (performance) to implement a counter
increment. Of course, a client application must not get a counter value
that another client has already got. Just the way generators work in
firebird.

Is for example using WAIT transactions the way to go?
Or how would I implement something like a queue (if neccessary) to get
the next counter value? Otherwise it might be possible that one client
keeps getting deadlocks while trying to "get access" to the counter
record.

BTW, I use Firebird 1.5, Delphi 2006 and UIB components.

--Heiko