AcquireConnection Method (DTS)

The AcquireConnection method allows a task to acquire exclusive ownership of a connection to an OLE DB service provider.

Applies To
Connection Object  

Syntax

object.AcquireConnection(TaskName) As Unknown

Part Description
Connection Expression that evaluates to an object in the Applies To list
TaskName Name of the task

Remarks

When an application calls Connection.AcquireConnection, the InUse property is set to True. The call fails if another task owns the connection. A task releases a connection by calling the ReleaseConnection method. This method is required only if you are creating a custom task.

All tasks must include calls to AcquireConnection and ReleaseConnection.

Prototype (C/C++)

HRESULT AcquireConnection(BSTR TaskName,
LPUNKNOWN *pRetVal);

See Also

ReleaseConnection Method

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.