The New method creates a new Column object with a specified name and ordinal position.
[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 |
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.
HRESULT New(
BSTR Name,
long Ordinal,
IDTSColumn **RetVal);
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 )