Subject Looping logic is "loopy"
Author mss@smart.net
In a program loop that processes all records, I've noticed that the
last record is not being retained by Interbase. Local tables
(dBase), however, process the last record.

Here's a Delphi example to show what I'm talking about...


tblSource.Active := TRUE;
tblIBDest.Active := TRUE;

while not tblSource.Eof do begin
tblIBDest.Append;

if not (tblIBDest.State in dsEditModes) then tblIBDest.Edit;
{do something here - add field values for example to new record}

tblSource.Next;
end;

tblIBDest.Post;


If I walk thru this logic using the debugger, I notice that each
record reaches the "Append" statement and is processed. When I
examine the resulting table, however, the last record is missing
(even though I saw it being appended using the debugger).

Any ideas as to what I am doing wrong?

Thanks,

- Dale F.