Subject Re: [ib-support] Re: Generator and Triggers with IB6 from Delphi and IBX
Author Robert F. Tulloch

> I have a doubt it is solution. If two transactions got the same
> max(Id)

They can't. The table is locked while the sp executes thus causing any other
transaction/access to wait until lock is removed. The lock is removed as soon as the
sp returns.

> and tries to insert record, one of them will cause violation
> of uniquiety.

> Anyway,
> if transaction got value N will be rolled back and other that got N+1
> commited, you have a hole in Id sequence.

And it will be filled the next time the sp is called, which is fine for what I am

Best regards