TZAbstractDataset.CommitUpdates
Posted: 08.08.2014, 13:24
Hi,
I think there is an error inside TZAbstractDataset.CommitUpdates in ZAbstractDataSet.pas. There should be a call to CachedResultSet.PostUpdates instead of CachedResultSet.CancelUpdates. PostUpdates call PostRowUpdates(OldRowAccessor, NewRowAccessor), which will copy buffer from NewRowAccessor. If we call CancelUpdates the buffer is copied from InitialRow to CurrentRow.
To fix it, we should modify:
procedure TZAbstractDataset.CommitUpdates;
begin
CheckBrowseMode;
if CachedResultSet <> nil then
CachedResultSet.CancelUpdates;
end;
Into :
procedure TZAbstractDataset.CommitUpdates;
begin
CheckBrowseMode;
if CachedResultSet <> nil then
CachedResultSet.PostUpdates;
end;
All the best,
Bogdan
I think there is an error inside TZAbstractDataset.CommitUpdates in ZAbstractDataSet.pas. There should be a call to CachedResultSet.PostUpdates instead of CachedResultSet.CancelUpdates. PostUpdates call PostRowUpdates(OldRowAccessor, NewRowAccessor), which will copy buffer from NewRowAccessor. If we call CancelUpdates the buffer is copied from InitialRow to CurrentRow.
To fix it, we should modify:
procedure TZAbstractDataset.CommitUpdates;
begin
CheckBrowseMode;
if CachedResultSet <> nil then
CachedResultSet.CancelUpdates;
end;
Into :
procedure TZAbstractDataset.CommitUpdates;
begin
CheckBrowseMode;
if CachedResultSet <> nil then
CachedResultSet.PostUpdates;
end;
All the best,
Bogdan