DataColumnMapping Class
Contains a generic column mapping for an object that inherits from DataAdapter. This class cannot be inherited.
Assembly: System.Data (in System.Data.dll)
The DataColumnMapping type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | DataColumnMapping() | Initializes a new instance of the DataColumnMapping class. |
![]() ![]() | DataColumnMapping(String, String) | Initializes a new instance of the DataColumnMapping class with the specified source column name and DataSet column name to map to. |
| Name | Description | |
|---|---|---|
![]() ![]() | DataSetColumn | Gets or sets the name of the column within the DataSet to map to. |
![]() ![]() | SourceColumn | Gets or sets the name of the column within the data source to map from. The name is case-sensitive. |
| 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.) |
![]() ![]() | GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction) | Gets a DataColumn from the given DataTable using the MissingSchemaAction and the DataSetColumn property. |
![]() ![]() ![]() | GetDataColumnBySchemaAction(String, String, DataTable, Type, MissingSchemaAction) | A static version of GetDataColumnBySchemaAction that can be called without instantiating a DataColumnMapping object. |
![]() ![]() | 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 SourceColumn name to a string. (Overrides Object::ToString().) |
A DataColumnMapping enables you to use column names in a DataTable that are different from those in the data source. The DataAdapter uses the mapping to match the columns when the tables in the DataSet or data source are updated. For more information, see DataAdapter DataTable and DataColumn Mappings (ADO.NET).
The following example creates a DataColumnMapping object and adds it to a DataColumnMappingCollection. It then tells the user that the mapping was added to the collection and shows the Parent for the 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.
