I am using Zeos Zeos 7.1.3-stable with Delphi 2010 and Firebird 2.5. I have the following code:
Code: Select all
ZQuery1.CachedUpdates := true;
ZQuery1.Open;
ZQuery1.First;
if not ZQuery1.Eof then
begin
Zquery1.Insert;
Zquery1.FieldByName('ID').AsInteger := 1;
Zquery1.FieldByName('MACHINECODE').AsString := 'A01';
ZQuery1.Post;
if ZQuery1.UpdatesPending then
begin
ZQuery1.ApplyUpdates;
ZQuery1.CommitUpdates;
end;
Zquery1.Edit;
Zquery1.FieldByName('MACHINECODE').AsString := 'A02';
ZQuery1.Post;
if ZQuery1.UpdatesPending then
begin
ZQuery1.ApplyUpdates;
ZQuery1.CommitUpdates;
end;
end;
'Cannot update a deleted row'. If CachedUpdates = false there is no error. The problem is in the commitupdates. When i do not execute the commitupdates there is no error. Does anyone know what the problem is?
Thanks in advance.
Kind regards,
Kees