ContextUtil.EnableCommit Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Define o consistent bit para true e o done bit para false no contexto COM+.
public:
static void EnableCommit();
public static void EnableCommit();
static member EnableCommit : unit -> unit
Public Shared Sub EnableCommit ()
Exceções
Não existe contexto disponível no COM+.
Exemplos
O seguinte exemplo de código chama o EnableCommit método.
[Transaction(TransactionOption::Required)]
public ref class ContextUtil_EnableCommit: public ServicedComponent
{
public:
void Example()
{
// Set the consistent bit to true and the done bit to false for the
// current COM+ context.
ContextUtil::EnableCommit();
}
};
[Transaction(TransactionOption.Required)]
public class ContextUtil_EnableCommit : ServicedComponent
{
public void Example()
{
// Set the consistent bit to true and the done bit to false for the
// current COM+ context.
ContextUtil.EnableCommit();
}
}
<Transaction(TransactionOption.Required)> _
Public Class ContextUtil_EnableCommit
Inherits ServicedComponent
Public Sub Example()
' Set the consistent bit to true and the done bit to false for the
' current COM+ context.
ContextUtil.EnableCommit()
End Sub
End Class
Observações
Se solicitado, o contexto COM+ irá comprometer a transação atual, mas o objeto não é desativado ao retornar o método.