The AcquireConnection method allows a task to acquire exclusive ownership of a connection to an OLE DB service provider.
Connection Object |
object.AcquireConnection(TaskName) As Unknown
Part | Description |
---|---|
Connection | Expression that evaluates to an object in the Applies To list |
TaskName | Name of the task |
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.
HRESULT AcquireConnection(BSTR TaskName,
LPUNKNOWN *pRetVal);