Subject Confusion about CommitAction and transaction timeouts
Author Stephen Boyd
I am in the middle of trying to migrate a large application from BDE
to IBO. For better or worse, this application make extensive use of
DBGrids so I need to use TIB_Transaction.TimeoutProps to keep the OAT
moving. I have been trying various combinations of parameters to see
what happens and I am getting confused. I think that I have
TimeoutProps figured out but the behaviour of CommitAction has got me
stumped.

Since I am using DBGrids I am using a TIBOQuery as my dataset. The
SQL for this query is assembled on the fly by the application based on
parameters supplied by the end user so the result set could
conceivably be quite large. I have set TimeoutProps as follows:

AllowCheckAOT = 5
Attemp = 5
AttemptMaxRows = 500
AttemptRetry = 1
AttemptTicks = 250
ForceClosed = 0
Isolation = tiReadCommitted;

If I set CommitAction to caInvalidateCursor, which is what I think I
want, I see IBO fetch 500 records and close the transaction. Perfect.
But after that, I see IBO continually opening a transaction,
performing RefreshKeys, and then closing the transaction. Because of
my settings in TimeoutProps it is doing this every couple of seconds.
This has got to be putting a strain on the server.

Why is IBO continually refreshing the keys? How do I make it stop
doing this while still leaving the data visible in the grid?