C
chen_ke
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TDatabase.ApplyUpdates(const DataSets: array of TDBDataSet);
var
I: Integer;
DS: TDBDataSet;
begin
StartTransaction;
try
for I := 0 to High(DataSets)do
begin
DS := DataSets;
if DS.Database <> Self then
DatabaseError(Format(SUpdateWrongDB, [DS.Name, Name]));
DataSets.ApplyUpdates;
end;
Commit;
except
Rollback;
raise;
end;
for I := 0 to High(DataSets)do
DataSets.CommitUpdates;
end;
var
I: Integer;
DS: TDBDataSet;
begin
StartTransaction;
try
for I := 0 to High(DataSets)do
begin
DS := DataSets;
if DS.Database <> Self then
DatabaseError(Format(SUpdateWrongDB, [DS.Name, Name]));
DataSets.ApplyUpdates;
end;
Commit;
except
Rollback;
raise;
end;
for I := 0 to High(DataSets)do
DataSets.CommitUpdates;
end;