共用方式為


ConnectionManager.ReleaseConnection(Object) Method

Definition

Frees the connection established during AcquireConnection(Object). Called at design time and runtime.

public:
 void ReleaseConnection(System::Object ^ connection);
public void ReleaseConnection (object connection);
member this.ReleaseConnection : obj -> unit
Public Sub ReleaseConnection (connection As Object)

Parameters

connection
Object

The connection to release.

Examples

The following code sample shows how to call the ReleaseConnection method to free the resources associated with the connection manager.

connectionMgr.ReleaseConnection(myConnection);  

Remarks

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

Applies to