DynamicPropertiesTask Object

DTS Programming

DTS Programming

DynamicPropertiesTask Object

The DynamicPropertiesTask object changes the values of package objects properties at runtime. Any property of any object in the package can be modified. This is useful for packages created with Data Transformation Services (DTS) Designer and the DTS Import/Export Wizard because many package object properties are fixed after the design process is complete.

The Dynamic Properties Task object provides several different sources for the new value of a property:

  • A constant

  • The contents of a data file

  • An environment variable

  • A DTS global variable

  • A field in an .ini file

  • An SQL query

In an application that creates and manipulates DTS objects, it is often easier to modify the values of properties directly in code rather than use a Dynamic Properties Task object. However, if part of a DTS package is contained within a module that cannot be modified easily, the Dynamic Properties Task object may be useful.

Collections
DynamicPropertiesTaskAssignments Collection Properties Collection

Properties
Assignments Property Name Property
Description Property  

Methods
Execute Method

Remarks

To use the Dynamic Properties Task object, for each package object property that is to be modified, a DynamicPropertiesTaskAssignment object is created. The properties of this object are set to specify the package object property to be changed and the source of the new value. The DynamicPropertiesTaskAssignment object is added to the DynamicPropertiesTaskAssignments collection.

The New method of the Tasks collection of the Package object returns a reference to a Task object. The CustomTask property of the Task object returns a reference to the appropriate custom task object. For more information, see Creating DTS Package Workflow and Tasks.

See Also

DynamicPropertiesTaskAssignment Object