Code: Select all
procedure TZAbstractCachedResultSet.PostUpdatesCached;
var
i: Integer;
begin
CheckClosed;
if FInitialRowsList.Count > 0 then
begin
i := 0;
while i < FInitialRowsList.Count do
begin
OldRowAccessor.RowBuffer := PZRowBuffer(FInitialRowsList[i]);
NewRowAccessor.RowBuffer := PZRowBuffer(FCurrentRowsList[i]);
Inc(i);
{ Updates default field values. }
if NewRowAccessor.RowBuffer.UpdateType = utInserted then
CalculateRowDefaults(NewRowAccessor);
{ Posts row updates. }
PostRowUpdates(OldRowAccessor, NewRowAccessor);
{MikhailovAP -- ??? }
{ If post was Ok - update the row update type. }
if NewRowAccessor.RowBuffer.UpdateType <> utDeleted then
begin
NewRowAccessor.RowBuffer.UpdateType := utUnmodified;
if (FSelectedRow <> nil)
and (FSelectedRow.Index = NewRowAccessor.RowBuffer.Index) then
FSelectedRow.UpdateType := utUnmodified;
end;
end;
{??? - Reset UpdateType after success}
end;
end;
Copy/paste code block resolves this problem (may be?)