Subject | Re: [ib-support] Generator and Triggers with IB6 from Delphi and IBX |
---|---|
Author | Robert F. Tulloch |
Post date | 2001-05-18T16:14:23Z |
Hi:
I didn't like that either. If you like I will send you what I did. If I remember it
is an sp which finds the next sequential number, add a record with that number then
returns the number to the call. If you rollback, it cancels the child records and
deletes the one added by the sp. It also handles collisions by waiting random length
of time and trying again. Times out after I think 5 tries.
Works fine. Folks told me to keep the gen_id for uniqueness and add another field
with the id. But since I needed the Id unique also, it was a silly duplication.
Code is c++ builder.
Best regards
I didn't like that either. If you like I will send you what I did. If I remember it
is an sp which finds the next sequential number, add a record with that number then
returns the number to the call. If you rollback, it cancels the child records and
deletes the one added by the sp. It also handles collisions by waiting random length
of time and trying again. Times out after I think 5 tries.
Works fine. Folks told me to keep the gen_id for uniqueness and add another field
with the id. But since I needed the Id unique also, it was a silly duplication.
Code is c++ builder.
Best regards