dotConnect Universal Documentation
Devart.Common Namespace / DbLoaderColumnCollection Class / Add Method
The DbLoaderColumn to add to the collection.
Example

In This Topic
    Add Method (DbLoaderColumnCollection)
    In This Topic
    Adds the specified DbLoaderColumn to the DbLoaderColumnCollection.
    Syntax
    'Declaration
     
    Public Function Add( _
       ByVal value As DbLoaderColumn _
    ) As Integer
    public int Add( 
       DbLoaderColumn value
    )

    Parameters

    value
    The DbLoaderColumn to add to the collection.

    Return Value

    Index of the new DbLoaderColumn object.
    Example
    The following example creates a DbLoaderColumnCollection, adds an instance of DbLoaderColumn to the collection, and returns a reference to the new DbLoaderColumn.
    public void CreateMyLoaderColumnColl(MySqlLoader myLoader)
    {
      MySqlLoaderColumnCollection myColumnCollection = myLoader.Columns;
      myColumnCollection.Add("DeptNo", MySqlType.Int);
      myColumnCollection.Add("DName", MySqlType.VarChar);
      myColumnCollection.Add("Loc", MySqlType.VarChar);
    }
    Public Sub CreateMyLoaderColumnColl(myLoader As MySqlLoader)
      Dim myColumnCollection As MySqlLoaderColumnCollection = myLoader.Columns
      myColumnCollection.Add("DeptNo", MySqlType.Int)
      myColumnCollection.Add("DName", MySqlType.VarChar)
      myColumnCollection.Add("Loc", MySqlType.VarChar)
    End Sub
    See Also