dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlLoaderColumnCollection Class
Members Example

In This Topic
    MySqlLoaderColumnCollection Class
    In This Topic
    Represents a collection of columns relevant to a MySqlLoader.
    Syntax
    Remarks
    Use MySqlLoaderColumnCollection class to add or remove columns that will be loaded. Order and number of columns in the collection must be equal to the order and number of columns in the loaded table.

    Note: This class is available with dotConnect for MySQL Professional edition only.

    Example
    Following example displays all loader columns.
    public void DisplayColumns(string tableName, MySqlConnection conn) {
    
      // Create loader instance
      MySqlLoader loader = new MySqlLoader();
    
      // Set up working connection
      // Connection must be opened
      loader.Connection = conn;
    
      // Set up table name for loading
      loader.TableName = tableName;
    
      // Create column collection for loading table
      loader.CreateColumns();
    
      // Iterate through column collection
      foreach (MySqlLoaderColumn column in loader.Columns)
        Console.WriteLine(column.Name);
    }
    Public Sub DisplayColumns(tableName as string, conn as MySqlConnection)
    
      ' Create loader instance
      Dim loader as MySqlLoader = new MySqlLoader()
    
      ' Set up working connection
      ' Connection must be opened
      loader.Connection = conn
    
      ' Set up table name for loading
      loader.TableName = tableName
    
      ' Create column collection for loading table
      loader.CreateColumns()
    
      ' Iterate through column collection
      Dim column as MySqlLoaderColumn
      For Each column in loader.Columns
        Console.WriteLine(column.Name)
      Next
    End Sub
    Inheritance Hierarchy

    System.Object
       System.Collections.CollectionBase
          Devart.Common.DbLoaderColumnCollection
             Devart.Data.MySql.MySqlLoaderColumnCollection

    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