Subject | Re: [ib-support] Looping logic is "loopy" |
---|---|
Author | Nando Dessena |
Post date | 2001-04-24T07:50:20Z |
Dale,
taking advantage (?) of some kind of autopost facility.
HTH
--
____
_/\/ando
> Here's a Delphi example to show what I'm talking about...you should balance your Append calls with Post calls. Otherwise you are
>
> 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).
taking advantage (?) of some kind of autopost facility.
> Any ideas as to what I am doing wrong?Put tblIBDest.Post inside the loop.
HTH
--
____
_/\/ando