[ Team LiB ] Previous Section Next Section

DataColumnMapping marshal by reference

System.Data.Common (system.data.dll) sealed class

This class represents a mapping between a field (or column) name in the data source (SourceColumn ) and the field name in the System.Data.DataSet (DataSetColumn ). The data source column name is case-sensitive, while the System.Data.DataSet column name isn't.

Column mappings are applied to the DataAdapter you use to transfer information. Column mappings work in both directions: in other words, the DataAdapter automatically maps the column when filling it with the appropriate data and can apply any changes back to the original data source column during updates. Column mappings are never added independently to a DataAdapter ; instead, they are added to a DataTableMapping , which can then be added to the DataAdapter.TableMappings collection.

public sealed class DataColumnMapping : MarshalByRefObject , System.Data.IColumnMapping, ICloneable {
// Public Constructors
   public DataColumnMapping(  );  
   public DataColumnMapping(string sourceColumn, string dataSetColumn);
// Public Instance Properties
   public string DataSetColumn{set; get; }          // implements System.Data.IColumnMapping
   public string SourceColumn{set; get; }           // implements System.Data.IColumnMapping
// Public Instance Methods
   public DataColumn GetDataColumnBySchemaAction(System.Data.DataTable dataTable, Type dataType, 
        System.Data.MissingSchemaAction schemaAction);

   public override string ToString(  );            // overrides object
}

Hierarchy

System.Object figs/U2192.gif System.MarshalByRefObject figs/U2192.gif DataColumnMapping(System.Data.IColumnMapping, System.ICloneable)

Returned By

DataColumnMappingCollection.{GetByDataSetColumn( ) , GetColumnMappingBySchemaAction( ) , this} , DataTableMapping.GetColumnMappingBySchemaAction( )

Passed To

DataColumnMappingCollection.{AddRange( ) , this} , DataTableMapping.DataTableMapping( )

    [ Team LiB ] Previous Section Next Section