I have next implementation of CommitUpdates:
I think, principally firstly commit to database should be done an only then datasets should clear their logs.
BTW, why it so principally CommitUpdates in Detail -> Master order?
Code:
procedure TOracleSession.CommitUpdates(const DataSets: array of TDataSet);
var i: Integer;
DataSetList: TList;
begin
DataSetList := OrderedDataSetList(DataSets);
try
// Commit the updates in each dataset (Detail -> Master)
for i := DataSetList.Count - 1 downto 0 do
TOracleDataSet(DataSetList.Items[i]).CommitUpdates;
// Commit the database transaction
if not MTSEnlisted then Commit;
finally
DataSetList.Free;
end;
end;
I think, principally firstly commit to database should be done an only then datasets should clear their logs.
BTW, why it so principally CommitUpdates in Detail -> Master order?
Last edited: