Subject Re: Does Firebird expose the db wide 'row version'?
Author hvlad
--- In firebird-support@yahoogroups.com, "samcarleton" wrote:
>
>
>
> --- In firebird-support@yahoogroups.com, "fernnaj" <yo@> wrote:
> >
> > Hello,
> >
> > I had the same question time ago, and I posted at MS Forums - please have a look at my post at http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/102fd11e-d7ce-479e-a07b-b2e836f3f87e - at the end min_active_rowversion is what we use.
>
> Fernando,
>
> That is EXACTLY the situation I am predicting. In the post you stated "Finally I opted to implement #2, as Firebird does have the same concept", can you give me a bit more info on how to do it in Firebird?

I doesn't fully read how MS Sync FW works but if you need to mark every inserted\updated record by increased number, generated at commit time, you can :
a) add TranNum field to the all interesting tables
b) fill this field in BEFORE INSERT OR UPDATE trigger using CURRENT_TRANSACTION value
c) create special table like TranMarks(TranNum, TranMark)
d) create sequence SeqTranMarks
e) create ON COMMIT database trigger which will insert CURRENT_TRANSACTION and next value of sequence SeqTranMarks into TranMarks table

Now you have marked all records by transaction numbers and order of transaction's commits.

Hope this helps,
Vlad