Metoda PipelineComponent.ReleaseConnections
Zwalnia połączenia ustanowione podczas AcquireConnections.O nazwie w projekcie czas i uruchom czas.
Przestrzeń nazw: Microsoft.SqlServer.Dts.Pipeline
Zestaw: Microsoft.SqlServer.PipelineHost (w Microsoft.SqlServer.PipelineHost.dll)
Składnia
'Deklaracja
Public Overridable Sub ReleaseConnections
'Użycie
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()
Uwagi
Wywoływany cyklicznie podczas projektowania składników i na końcu wykonanie składnika.Składniki należy zwolnić wszystkie połączenia, które były otwierane i utrzymywane w AcquireConnections.
Przykłady
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