System.Win.Mtsobj.TMtsAutoObject.EnableCommit

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure EnableCommit;

C++

void __fastcall EnableCommit();

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Win.Mtsobj.pas
System.Win.Mtsobj.hpp
System.Win.Mtsobj TMtsAutoObject

Description

Allows clients to complete transactions without releasing state information.

Call EnableCommit to indicate that the MTS Automation object can complete its current transaction without releasing state information. Unlike the SetComplete method (which also signals that the current transaction can be committed), EnableCommit does not allow MTS to deactivate the MTS Automation object. This lets the MTS Automation object preserve state information over multiple interface calls, while still allowing clients that have enlisted the object in a transaction to commit.

By default, transactions can be completed when an interface call ends, unless the DisableCommit method is called. There is no need to call EnableCommit unless the MTS Automation object has previously called DisableCommit.

Note: Although EnableCommit permits the current transaction to be completed, it does not automatically commit the transaction. The client that enlisted the MTS Automation object must still explicitly commit that transaction. If MTS started the transaction automatically (because the MTS Automation object requires a transaction for its interface calls), the transaction is not committed until the data module calls SetComplete.

See Also