SqlCommand.Transaction Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta l'oggetto all'interno del SqlTransaction quale viene eseguito l'oggetto 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à
Il SqlTransaction Il valore predefinito è null.
- Attributi
Commenti
Non è possibile impostare la Transaction proprietà se è già impostata su un valore specifico e il comando è in corso di esecuzione. Se si imposta la proprietà della transazione su un SqlTransaction oggetto che non è connesso allo stesso SqlConnection oggetto , viene generata un'eccezione SqlCommand la volta successiva che si tenta di eseguire un'istruzione.