Subject Re: [ib-support] Generator and Triggers with IB6 from Delphi and IBX
Author Martijn Tonies
What we used to do is supply the unique ID ourselves. We didn't rely on a
trigger - instead, when inserting a new order (which was assembled before,
locally with Objects only), we do a 'select gen_id(gen, 1) from
rdb$database) and use this number instead of a triggered one. This way, you
only get the next generator ID when you really insert an order.

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird

Upscene Productions

"This is an object-oriented system.
If we change anything, the users object."

""Christopher P. Boothe"" <cboothe@...> wrote in message
> I have a question.
> If I manually start a transaction for adding a new record. I'm using the
> IBX components with IBSQL IBTransaction and IBUpdateSQL. Well anyway If I
> manually start a transaction the user clicks to add a record, and the user
> cancels and I then rollback the transaction. The generator will have
> triggered and if the user then goes in and adds a new record because the
> generator triggers again it will be 2 integers away from the last record.
> It will skip one number?
> Now this isn't a huge problem because the record will still be unique.
> I hate having order numbers skip every once in a while when someone
> an entry. Any way to take care of this?
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to