DataTableMapping Class
Contains a description of a mapped relationship between a source table and a DataTable. This class is used by a DataAdapter when populating a DataSet.
Assembly: System.Data (in System.Data.dll)
The DataTableMapping type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | DataTableMapping() | Initializes a new instance of the DataTableMapping class. |
![]() ![]() | DataTableMapping(String, String) | Initializes a new instance of the DataTableMapping class with a source when given a source table name and a DataTable name. |
![]() ![]() | DataTableMapping(String, String, array<DataColumnMapping>) | Initializes a new instance of the DataTableMapping class when given a source table name, a DataTable name, and an array of DataColumnMapping objects. |
| Name | Description | |
|---|---|---|
![]() ![]() | ColumnMappings | Gets the DataColumnMappingCollection for the DataTable. |
![]() ![]() | DataSetTable | Gets or sets the table name from a DataSet. |
![]() ![]() | SourceTable | Gets or sets the case-sensitive source table name from a data source. |
| Name | Description | |
|---|---|---|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() ![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetColumnMappingBySchemaAction | Gets a DataColumn from the specified DataTable using the specified MissingMappingAction value and the name of the DataColumn. |
![]() ![]() | GetDataColumn | Returns a DataColumn object for a given column name. |
![]() ![]() | GetDataTableBySchemaAction | Gets the current DataTable for the specified DataSet using the specified MissingSchemaAction value. |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() ![]() | MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() ![]() | ToString | Converts the current SourceTable name to a string. (Overrides Object::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | ICloneable::Clone | Creates a new object that is a copy of the current instance. |
![]() ![]() ![]() | ITableMapping::ColumnMappings | Gets the derived DataColumnMappingCollection for the DataTable. |
A DataTableMapping provides a master mapping between the data returned from a query against a data source, and a DataTable. The DataTableMapping name can be passed in place of the DataTable name to the Fill method of the DataAdapter. For more information, see DataAdapter DataTable and DataColumn Mappings (ADO.NET).
The following example creates a DataTableMapping object and adds it to a DataTableMappingCollection. It then informs the user that the mapping was added to the collection and displays the parent mapping.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

