Subject EOF reported after next - missing one record.
Author danialwidner
I have isolated a problem discovered 2 weeks ago and reported
directly to Jason.

This is the scenario:


IBOQuery.open; // record count = x (say 20 for instance)

While not iboQuery.eof do
Begin
.....


DB.StartTransaction;

UpdateQuery.execSQL; // update control record as completed

DB.Commit;
// record count is now x-1 because it requeried.
// record 1 is NOT the record we came into the loop with
// It is now the original record # 2
iboQuery.Next; // we just skipped the ORIGIONAL record # 2

End;
// record #2 never gets processed.

I know that putting the IBOQuery used for control on it's own
transaction will fix the problem. However, this is BDE converted
code. It could take months to just add that item to all the files
and queries that need it. Standard BDE operation needs to be
restored / implemented (IE don't refire IBOqueries on commit if the
values in the query itself have not been altered. Whatever).

Perhaps have independent internal transactions for each query. Then
from the DB StartTransaction action track a "Dirty" flag for those
tranactions that are exececuted in some / any way before the
commit / rollback action. Then only commit / rollback the dirty
transactions leaving the clean external loop transactions alone.


Dan