MySqlCommand.Transaction Property

MySQL Connector/Net

MySqlCommandTransaction Property
Gets or sets the MySqlTransaction within which the MySqlCommand executes.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.9.9
Syntax
public MySqlTransaction Transaction { get; set; }
Public Property Transaction As MySqlTransaction
	Get
	Set
public:
property MySqlTransaction^ Transaction {
	MySqlTransaction^ get ();
	void set (MySqlTransaction^ value);
}
member Transaction : MySqlTransaction with get, set

Property Value

Type: MySqlTransaction
The MySqlTransaction. The default value is a null reference (Nothing in Visual Basic).
Remarks
You cannot set the Transaction property if it is already set to a specific value, and the command is in the process of executing. If you set the transaction property to a MySqlTransaction object that is not connected to the same MySqlConnection as the MySqlCommand object, an exception will be thrown the next time you attempt to execute a statement.
See Also