Subject Re: [IBO] Problem editing with TIBOQuery
Author Jason Wharton
May I suggest that you use a different approach?

Use a separate statement and call the ExecSQL method. Then, refresh your
dataset.

MyUpdate.SQL.Text := 'UPDATE TABLE SET SALES = 0 WHERE <some criteria>';
MyUpdate.ExecSQL;
MyQuery.Refresh;

As for why your query won't update a record, it could be a number of things.
Please show us more information. KeyLinks and RequestLive are a good place
to start.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <steve@...>
To: <IBObjects@egroups.com>
Sent: Tuesday, December 05, 2000 10:00 AM
Subject: [IBO] Problem editing with TIBOQuery


> Hi All,
>
> I'm getting the error "Cannot Edit current Row" when trying to edit
> using a TIBOQuery control.
>
> Error Class: EIB_DatasetError
> Error Message: Cannot Edit current Row
>
> My code is very simple:
>
> with DM.qryMItem do
> Begin
> While (not Eof) do
> Begin
> Edit;
> FieldByName('Sales').AsFloat := 0.0;
> Post;
> Next;
> End;
> End;
>
> What am I missing?
>
> Thanks,
> Steve Harp
> steve@...
>
>
>
>
>