Name
DataTableMapping
Synopsis
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(stringsourceTable, stringdataSetTable); public DataTableMapping(stringsourceTable, stringdataSetTable, 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(stringsourceColumn, System.Data.MissingMappingActionmappingAction); public ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access