Subject Transactions question
Author Michael Vilhelmsen
Hi

I have a some questions regarding transactions.

If have two programs (using IBO and IBX running on FB 1.0.3 on Win32).

In those programs I do something like this.
On showing a window I usually on FormShow open one or more querys to
work on.

When the user works in a windows I usually insert records into a temp
table. Every insert is being done like this:

if (not (MyTransAction.Active)) then
MyTransAction.StartTransaction.

Do some update or insert

MyTransAction.Commit.


Some times the user can cancel something he has done, and then I do a
Rollback instead.

On FormClose I always do something like this:

for i := 0 to Dm.ComponentCount - 1 do
begin
if (Dm.Components[i] is TIBOQuery) and ((Dm.Components[i] as
TIBOQuery).Tag = 0) then
begin
(Dm.Components[i] as TIBOQuery).Close;
end;
end;


This is to ensure, that I have no active transactions.

Now, does a rollback cause the gab between OAT and NT to grow ?


Sometimes I start a transaction and doing some updates and finally
commit.

Somewhere in the updates I will call a CommitRataining. But it will
always be followed very shortly by a Commit.

Does a commitretaining the gab to grow ?


What happens if I open some querys, and later does a commit without
closing them ?
Does this cause the gab to grow ?



I can se at a specific customer the gab grow in the day, so somewhere
I must be doing something wrong.


Regards

Michael