Subject Re: Can I create a trigger for insert, update, delete and a transaction commit?
Author un_spoken
> > Is it possible to obtain such transaction ID in a trigger?
>
> CURRENT_TRANSACTION
>


Thank you, I've read information about this variable here: http://www.firebirdsql.org/refdocs/langrefupd15-current_transaction.html

I am wonder what will hapen in a such scenerio:

I am updating 100 rows. In ON UPDATE Trigger of the first row I am reading CURRENT_TRANSACTION and it gives me a number 1234. In the meantime some new transactions happened on the database. For example 10 users made 10 select queries thus resulting in 10 new transactions.

I am stiil in my transaction and now I am updating row number 97. I am reading CURRENT_TRANSACTION once again, what will be it's result? Will it be 1234 or 1244 (+10 transactions) ?

In case of the latter this is no good for me. I would like to have a number of a transaction in which I am in. Sorry if I wasn't precise last time :)