SqlCommand.Transaction Proprietà

Definizione

Ottiene o imposta l'oggetto SqlTransaction in cui viene eseguito SqlCommand.

public:
 property System::Data::SqlClient::SqlTransaction ^ Transaction { System::Data::SqlClient::SqlTransaction ^ get(); void set(System::Data::SqlClient::SqlTransaction ^ value); };
public System.Data.SqlClient.SqlTransaction Transaction { get; set; }
[System.ComponentModel.Browsable(false)]
[System.Data.DataSysDescription("DbCommand_Transaction")]
public System.Data.SqlClient.SqlTransaction Transaction { get; set; }
[System.ComponentModel.Browsable(false)]
public System.Data.SqlClient.SqlTransaction Transaction { get; set; }
member this.Transaction : System.Data.SqlClient.SqlTransaction with get, set
[<System.ComponentModel.Browsable(false)>]
[<System.Data.DataSysDescription("DbCommand_Transaction")>]
member this.Transaction : System.Data.SqlClient.SqlTransaction with get, set
[<System.ComponentModel.Browsable(false)>]
member this.Transaction : System.Data.SqlClient.SqlTransaction with get, set
Public Property Transaction As SqlTransaction

Valore della proprietà

Oggetto SqlTransaction. Il valore predefinito è null.

Attributi

Commenti

Non è possibile impostare la Transaction proprietà se è già impostata su un valore specifico e il comando è in fase di esecuzione. Se si imposta la proprietà della transazione su un SqlTransaction oggetto non connesso allo stesso SqlConnection oggetto dell'oggetto , viene generata un'eccezione SqlCommand la volta successiva che si tenta di eseguire un'istruzione.

Si applica a

Vedi anche