Connection Property

MySQL Connector.Net

Collapse image Expand Image Copy image CopyHover image
Gets the MySqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.8.4.0

Syntax

C#
public MySqlConnection Connection { get; }
Visual Basic
Public ReadOnly Property Connection As MySqlConnection
	Get
Visual C++
public:
property MySqlConnection^ Connection {
	MySqlConnection^ get ();
}

Field Value

The MySqlConnection object associated with this transaction.

Remarks

A single application may have multiple database connections, each with zero or more transactions. This property enables you to determine the connection object associated with a particular transaction created by BeginTransaction()()()().

See Also