ConnectionManagerBase.ReleaseConnection Method (Object)


Frees the connection established during AcquireConnection. Called at design time and run time.

Namespace:   Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

public virtual void ReleaseConnection(
	object connection


Type: System.Object

The connection to release.

This method is called repeatedly during component design by the runtime engine and at the end of component execution. The components then release any connections that were opened and maintained in AcquireConnection. This method is called only when OfflineMode is false.

private System.Data.OleDb.OleDbConnection oledbConnection;
public override void ReleaseConnections()
    if (oledbConnection != null && oledbConnection.State != ConnectionState.Closed )
Return to top