[ Team LiB ] Previous Section Next Section

DataTableMapping marshal by reference

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

This class represents a mapping between a table name in the data source (SourceTable ) and the table name in the System.Data.DataSet (DataSetTable ). The data source table name is case-sensitive, while the System.Data.DataSet table name isn't. A third property, DataColumnMappingCollection , contains all field-name mappings for the table. Column and table name mappings aren't required (by default, ADO.NET simply uses the data source names), but they do add that an extra layer of indirection.

Table mappings are applied to the DataAdapter . Table mappings work in both directions: when filling a table and when updating it. You add a table mapping to a DataAdapter by inserting the appropriate DataTableMapping into the DataAdapter.TableMappings collection.

public sealed class DataTableMapping : MarshalByRefObject , System.Data.ITableMapping, ICloneable {
// Public Constructors
   public DataTableMapping(  );  
   public DataTableMapping(string sourceTable, string dataSetTable);
   public DataTableMapping(string sourceTable, string dataSetTable, DataColumnMapping[  ] columnMappings);
// Public Instance Properties
   public DataColumnMappingCollection ColumnMappings{get; } 
   public string DataSetTable{set; get; }          // implements System.Data.ITableMapping
   public string SourceTable{set; get; }             // implements System.Data.ITableMapping
// Public Instance Methods
   public DataColumnMapping GetColumnMappingBySchemaAction(string sourceColumn,
        System.Data.MissingMappingAction mappingAction);
   public DataTable GetDataTableBySchemaAction(System.Data.DataSet dataSet, 
         System.Data.MissingSchemaAction schemaAction);
   public override string ToString(  );                          // overrides object
}

Hierarchy

System.Object figs/U2192.gif System.MarshalByRefObject figs/U2192.gif DataTableMapping(System.Data.ITableMapping, System.ICloneable)

Returned By

DataTableMappingCollection.{GetByDataSetTable( ) , GetTableMappingBySchemaAction( ) , this} , RowUpdatedEventArgs.TableMapping , RowUpdatingEventArgs.TableMapping

Passed To

Multiple types

    [ Team LiB ] Previous Section Next Section