AllocTranContext (CM)
<source lang='delphi'>function AllocTranContext:Integer;</source>
Cette fonction alloue un contexte de transaction.
Result | Un entier représentant un nouveau contexte de transaction |
Exemple <source lang='delphi'> var new,old:Integer; begin
new := ClassManager.AllocTranContext; old := ClassManager.ActivateTranContext(new); try ClassManager.BeginTran; try ... ClassManager.Commit; except ClassManager.RollBack; end; finally ClassManager.DeActivateContext(new); ClassManager.ActivateContext(old); end;
end; </source>
<source lang='delphi'> var old:Integer; begin
old := ClassManager.ActivateTranContext(ClassManager.AllocTranContext); try ClassManager.BeginTran; try ... ClassManager.Commit; except ClassManager.RollBack; end; finally ClassManager.ActivateContext(old); end;
end; </source>
Voir aussi
{{#if:Gestion des transactions (CM)|
{{#if:Gestion des transactions (CM)|— Gestion des transactions (CM) |}} — Développement DSM —
|
{{#if:|— [[{{{1}}}]] |}} — Développement DSM —
}}