Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ConnectionManagerBase.ReleaseConnection Method

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
)

Parameters

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 )
        oledbConnection.Close();
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.