BatchLongTranEx (CM)
procedure BatchLongTranEx(iOptions:TCommitOptions);
Cette procédure valide et transmet les objets en transaction au serveur SQL si le nombre d'objet est supérieur ou égale à BatchSize de la transaction.
iOptions est utilisé pour la phase de validation des objets en transaction.
| iOptions | Options de validation
Voir CommitEx |
Exemple
var idx:Integer;
begin
ClassManager.BeginLonTran(100,'MaClass');
try
for idx:=0 to VeryBigInt do
begin
doProcessItem(idx);
ClassManager.BatchLongTranEx(coNoCuml);
end;
ClassManager.CommitLongTranEx(coNoCumul);
except
ClassManager.RollBackLongTran;
raise;
end;
end;
Voir aussi