New (Name) Method

DTS Programming

DTS Programming

New (Name) Method

The New method creates a new object for a collection with a specified name.

Applies To
GlobalVariables Collection PrecedenceConstraints Collection
Lookups Collection  
Syntax

[Set object =] Collection.New( Name )

Part Description
Collection Expression that evaluates to an object in the Applies To list
object Object variable to receive reference to created object
Name String that is to be the name of the created object

Remarks

The required type of object depends on the collection to which it is being added:

Collection Object
GlobalVariables GlobalVariable Object
Lookups Lookup Object
PrecedenceConstraints PrecedenceConstraint Object
TransformationSets TransformationSet Object

The New method for the collections in the Applies To list creates a new object with the specified name. The New methods for other collections use different parameters and syntax.

Prototype (C/C++)

HRESULT New(
    BSTR Name,
    ObjectInterface **RetVal);

Examples

This sample statement creates a new TransformationSet object named Customers, in Microsoft® Visual Basic®:

   Set objTransSet = objParPumpTask.TransformationSets.New( "Customers" )

See Also

Add Method

New Method

New (Columns) Method

New (ID) Method