PipelineComponent.ReleaseConnections Metodo

Definizione

Libera le connessioni stabilite durante AcquireConnections(Object). Chiamato in fase di progettazione e di esecuzione.

public:
 virtual void ReleaseConnections();
public virtual void ReleaseConnections ();
abstract member ReleaseConnections : unit -> unit
override this.ReleaseConnections : unit -> unit
Public Overridable Sub ReleaseConnections ()

Esempio

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  

Commenti

Chiamata ripetutamente durante la progettazione del componente e alla fine dell'esecuzione del componente. I componenti devono rilasciare le connessioni aperte e gestite in AcquireConnections.

Si applica a