Subject Re: Need help on getting transaction id
Author vlaivmail
Thanks heLen,

About those internal transaction IDs - is there a
possibility that I get same transaction ID for different
transactions (first before backup/restore and second after)?

i.e. two rows in log table having been logged at two distinct
transaction (two weeks apart) with backup/restore in between
have same transaction IDs logged?

--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 11:07 AM 5/09/2003 +0000, you wrote:
> >Hi all,
> >
> >
> >I need some help on getting transaction ID in body of trigger.
> >
> >(it does not have to be actual ID but kind of unique ID for every
> >transaction (like generator value) datatype Int32).
> >
> >I tried all sort of tricks with temporary tables and transaction
> >visibility
> >but nothing works ...
> >
> >I am making a user/table activity logging system and need to
record
> >unique
> >transaction ID (so I can determine
> >group of operations that was done in same transaction).
> >
> >Thanks in advance,
>
> In Firebird 1.5, the current transaction ID is available in the
context
> variable CURRENT_TRANSACTION:
>
> insert into YourLogTable (TransID, Whatever)
> values (CURRENT_TRANSACTION, 'somedata');
>
> Internal transaction ids are unique only within a single
backup/restore cycle.
>
> heLen