SqlTransaction.Connection プロパティ

定義

トランザクションに関連付けられた SqlConnection オブジェクトを取得します。トランザクションが既に無効になっている場合は、null が返されます。

public:
 property Microsoft::Data::SqlClient::SqlConnection ^ Connection { Microsoft::Data::SqlClient::SqlConnection ^ get(); };
public Microsoft.Data.SqlClient.SqlConnection Connection { get; }
member this.Connection : Microsoft.Data.SqlClient.SqlConnection
Public ReadOnly Property Connection As SqlConnection

プロパティ値

トランザクションに関連付けられている SqlConnection オブジェクト。

注釈

1 つのアプリケーションに複数のデータベース接続があり、それぞれが 0 個以上のトランザクションを持つ場合があります。 このプロパティを使用すると、 によって作成された特定のトランザクションに関連付けられている接続オブジェクトを BeginTransaction決定できます。

適用対象