Subject RE: [IBO] Generator values not udpated
Author Kevin Stanton
I've seen this before and never got a real clear answer. One of the answers
pertained to transactions which should never be the case as I understand it,
generators work outside all transactions - when a generator is issued, it's
gone.



This caused a nasty problem in my app trying to keep sequential invoice
numbers. I can't remember how I worked around it but I'll take a look.



Kevin





_____

From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Ed Dressel
Sent: Thursday, November 06, 2008 11:02 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Generator values not udpated



FB 1.5 Embedded.

I have some pretty easy to understand code where I get a generator
value and insert a new record in a table--I do this for various
tables. I am using Delphi and IBO, and here is an example:

lPersonID := FIBConn.Gen_ID('GEN_PERSON_ID', 1);

where lPersonID is an integer, and FIBConn is a TIBODatabase.

Multiple inserts happen to each table and the ID's fr the new records
are exactly what I would expect.

But occasionally, the values for the generators are reverted back to
their values were updated--the values in the tables are correct, it's
just the generators that are not correct. There is no rollbacks (and
even if there was, the generators shouldn't be rolled back, right?).

It ends up causing major headaches for me.

Any ideas on what might cause this?

THank you,
Ed Dressel





[Non-text portions of this message have been removed]