次の方法で共有


PipelineComponent.ReleaseConnections メソッド

AcquireConnections の間に確立された接続を解放します。 デザイン時および実行時に呼び出されます。

名前空間:  Microsoft.SqlServer.Dts.Pipeline
アセンブリ:  Microsoft.SqlServer.PipelineHost (Microsoft.SqlServer.PipelineHost.dll)

構文

'宣言
Public Overridable Sub ReleaseConnections
'使用
Dim instance As PipelineComponent

instance.ReleaseConnections()
public virtual void ReleaseConnections()
public:
virtual void ReleaseConnections()
abstract ReleaseConnections : unit -> unit  
override ReleaseConnections : unit -> unit
public function ReleaseConnections()

説明

コンポーネントのデザイン時、およびコンポーネントの実行の最後に繰り返し呼び出されます。 コンポーネントは、AcquireConnections で開かれ保持されたすべての接続を解放します。

使用例

private System.Data.OleDb.OleDbConnection oledbConnection;
public override void ReleaseConnections()
{
    if (oledbConnection != null && oledbConnection.State != ConnectionState.Closed )
        oledbConnection.Close();
}
Private oledbConnection As System.Data.OleDb.OleDbConnection 

Public Overrides Sub ReleaseConnections() 
 If Not (oledbConnection Is Nothing) AndAlso Not (oledbConnection.State = ConnectionState.Closed) Then 
   oledbConnection.Close 
 End If 
End Sub

関連項目

参照

PipelineComponent クラス

Microsoft.SqlServer.Dts.Pipeline 名前空間