New (Columns) Method

DTS Programming

DTS Programming

New (Columns) Method

The New method creates a new Column object with a specified name and ordinal position.

Applies To
Columns Collection
Syntax

[Set object =] Collection.New( Name, Ordinal )

Part Description
Columns Expression that evaluates to a Columns collection
object Expression that evaluates to a Column object
Name String that is the name of the column
Ordinal Long that is the ordinal position of the column

Remarks

The New method for the Columns collection creates a new object based on the specified Name and Ordinal. The New methods for other collections use different parameters and syntax.

Prototype (C/C++)

HRESULT New(
    BSTR Name,
    long Ordinal,
    IDTSColumn **RetVal);

Examples

This Microsoft® Visual Basic® example creates a new Column object named LastName that is to be the third column in the source columns collection:

   Set objColumn = objTransform.SourceColumns.New( "LastName", 3 )

See Also

Add Method

Adding DTS Column Objects

New Method

New (ID) Method

New (Name) Method