Connections Collection

DTS Programming

DTS Programming

Connections Collection

The Connections collection is a group of Connection objects containing information about connections to OLE DB service providers. This collection allows connection pooling and reuse across steps and tasks in a DTS package.

Applies To
Package Object Package2 Object
Properties
Count Property Parent Property

Methods
Add Method Item Method
BeginAcquireMultipleConnections Method New (ID) Method
EndAcquireMultipleConnections Method NewDataLink Method
Insert Method  

Remarks

When implementing a custom task that must acquire more than one connection, do the following to avoid deadlocks:

  1. Call BeginAcquireMultipleConnections.

  2. For each connection to be acquired:
    • Verify that connection.InUse is FALSE.

    • Call connection.AcquireConnection.
  3. Call EndAcquireMultipleConnections.
Prototype (C/C++)

HRESULT GetConnections(IDTSConnections **pRetVal);

See Also

Connection Object

Creating DTS Package Objects and Connections