Subject Transaction number discrepancy
Author dr_john_mp
In order to try and track stuck programs/transactions I have started
to include a small timer routine that is intended to identify and
record the oldest transaction used by a program every few minutes.

procedure TfMRP.Timer3Timer(Sender: TObject);
var
i,t,j : integer;
tstr,s : string;
tTrans: TIBTransaction;
tsql : TIBQuery;
begin
t := 0;
tstr := '';
for i := 0 to Database.ComponentCount -1 do
if Database.Components[i].ClassType = TIBTransaction then
begin
try
tTrans := TIBTransaction(LoaderData.Components[i]);
if tTrans.Intransaction then
begin
j := tTrans.TransactionID;
if (t = 0) or (t > j) then
begin
t := j;
tstr := tTrans.Name;
end;
end;
except
end;
end;
etc - where Database is the Delphi form with all my database components.

If I use IBExpert (or another program) to get the header page
statistics from firebird (v2.0.0.12748) I can compare the lowest
transaction on each program with the oldest active transaction
reported by the database.

Unfortunately the above program gives me transaction ID's which are
lower (older) that any of the numbers reported by the database in its
header page. whilst I can understand this might happen in classic
server if what is reported only relates to the curent thread - I also
get it testing on a single PC where there is only IBExpert and one
program running.

I'm obviously missing something ?