Using the DTS Custom Task Properties Provider

DTS Programming

DTS Programming

Using the DTS Custom Task Properties Provider

A custom task can invoke the Data Transformation Services (DTS) properties provider explicitly and access the collection it returns.

When a custom task implements a placeholder for the CustomTask_Properties property or returns NULL or Nothing, the default DTS properties provider generates a Properties collection and returns a reference to it. However, the custom task is not able to access or modify the collection.

Example

The following Microsoft® Visual Basic® code shows how to invoke the DTS properties provider explicitly (for example, in order to change the default value of a custom task property). Create the PropertiesProvider object and invoke the GetPropertiesForObject method:

Private Property Get CustomTask_Properties() As DTS.Properties
'Use DTS properties provider to generate the collection.
    Dim objPropsProvider As New DTS.PropertiesProvider
    Dim colProperties    As DTS.Properties

    Set colProperties = objPropsProvider.GetPropertiesForObject(Me)
    Set objPropsProvider = Nothing

    'Access the properties collection through colProperties here.

    Set CustomTask_Properties = colProperties
End Property

See Also

GetPropertiesForObject Method

Properties Collection

PropertiesProvider Object