var
mytransaction : TDBXTransaction;
begin
mytransaction := sqlconnection1.BeginTransaction;
try
if clientdataset1.ChangeCount > 0 then clientdataset1.ApplyUpdates(0);
...
if clientdatasetn.ChangeCount > 0 then clientdatasetn.ApplyUpdates(0);
sqlconnection1.CommitFreeAndNil(mytransaction);
except
sqlconnection1.RollbackFreeAndNil(mytransaction);
end;
end;
Delphi dbExpress 의 SQLConnection 에서 트랜젝션 처리하기
2012.02.08 02:32
dbExpress 의 SQLConnection 에서 트랜젝션 처리하기