procedure TMTSDataModule1.UpdateData(vData1,vData2:OleVariant);
var
FTransactionContextEx:ITransactionContextEx;
ErrorCount:Integer;
OwnerData:OleVariant;
begin
FTransactionContextEx:=CreateTransactionContextEx;
try
DataSetProvider1.ApplyUpdates(vData1,0,ErrorCount,OwnerData);
DataSetProvider2.ApplyUpdates(vData2,0,ErrorCount,OwnerData);
FTransactionContextEx.Commit;
except
FTransactionContextEx.Abort;
raise;
end;
end;