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
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also