The Insert method inserts an object in an ordinal position in a collection.
collection.Insert Position, Object
Part | Description |
---|---|
collection | Expression that evaluates to an collection in the Applies To list |
Position | Ordinal position of the object to insert |
Object | Object to be inserted |
The required type of Object depends on the collection to which it is being inserted.
Collection | Object |
---|---|
Columns | Column Object |
Connections | Connection Object Connection2 Object |
GlobalVariables | GlobalVariable Object |
Lookups | Lookup Object |
PrecedenceConstraints | PrecedenceConstraint Object |
Steps | Step Object Step2 Object |
Tasks | Task Object |
Transformations | Transformation Object Transformation2 Object |
TransformationSets | TransformationSet Object |
The Insert method does not create an object. It adds an existing object to its collection. Typically, you create the object with the New method of the collection.
HRESULT Insert(
VARIANT Position,
Interface *Object);