Subject Re: [IBO] Problems with EOF
Author Svein Erling Tysvær
One thing surprises me a little, Lucas. I thought Jason said that we
should use First with TIB_Cursors and Open with TIB_Queries - have I
misunderstood, or doesn't it matter?

Another thing is that I don't quite understand why Pete would use a
query component, using a TIB_DSQL with an update statement would in my
opinion be the way to go if the code is as simple as this.

Set

--- In IBObjects@yahoogroups.com, Lucas Franzen wrote:
> Maybe your code should look like:
>
> procedure tform1.closeCorrespondence;
> begin
> with qryFollowUpEmails do
> begin
> try
> First;
> while not EOF do
> begin
> Edit;
> Fieldbyname('correspondencedate').value:=now();
> Fieldbyname('status').AsString:='closed';
> POST;
> end;
> NEXT;
> except
> if State in [dssEdit] then Cancel;
> end
> CLOSE;
> end;
> end;
>
> Luc.