Record Updates with ADO -
05-04-2004
, 02:24 PM
This is the environment:
- SQLBase Server 7.5
- SQLBase Driver Pack 8.5
- Delphi 7
I am having trouble trying to update records using
CursorLocation = clClient.
This is the code:
ADOQuery1.Close;
ADOQuery.SQL.Text := 'select * from address where addressid = 405';
ADOQuery1.Open;
ADOQuery1.Properties['Update Criteria'].Value := adCriteriaKey
ADOQuery1.Edit;
ADOQuery1.FieldByName('Addres2').AsString := Edit1.Text;
ADOQuery1.Post;
ADOQuery1.UpdateBatch;
I get an exception saying that the record I am trying to modify has
already changed. The exception happens on the POST.
From what I understood, the problem is that the values Delphi is
trying to write back to the Recordset don't match.
That's why I was trying to use the update criteria property.
But it seems like the problem happens locally, even before we get to
the server. |