DTS Programming
New Method
The New method creates a new, unnamed object for a collection.
Applies To
DTSMQMessages Collection | Steps Collection |
DynamicPropertiesTaskAssignments Collection |
Syntax
[Set object =] Collection.New
Part | Description |
---|---|
Collection | Expression that evaluates to an object in the Applies To list |
object | Object variable to receive reference to created object |
Remarks
The required type of object depends on the collection to which it is being added:
Collection | Object |
---|---|
DTSMQMessages | DTSMQMessage Object |
DynamicPropertiesTaskAssignments | DynamicPropertiesTaskAssignment Object |
Steps | Step Object Step2 Object |
The New method for the collections in the Applies To list creates a new object based on the collection type. The New methods for other collections use different parameters and syntax.
Prototype (C/C++)
HRESULT New(
ObjectInterface **RetVal);
Example
To create a new Step object using Microsoft® Visual Basic®, use:
Set objStep = objPackage.Steps.New