Subject Re: [IBO] Generator values not udpated
Author Thomas Steinmaurer
Hi Ed,

> 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?).

Right. Generators are running outside of transaction control.

But you can decrement a generator value by using a negativ number as
increment. Perhaps this happens somewhere?

Although, that the numbers in the tables are correct, but the generator
values are not, sounds weird, except you are fiddling around with
decrementing generators, perhaps by accident.


--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/