DataColumnMapping Class

Contains a generic column mapping for an object that inherits from DataAdapter. This class cannot be inherited.

Namespace: System.Data.Common
Assembly: System.Data (in

Public NotInheritable Class DataColumnMapping
	Inherits MarshalByRefObject
	Implements IColumnMapping, ICloneable
Dim instance As DataColumnMapping

public final class DataColumnMapping extends MarshalByRefObject implements IColumnMapping, ICloneable
public final class DataColumnMapping extends MarshalByRefObject implements IColumnMapping, ICloneable

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 Setting Up DataTable and DataColumn Mappings.

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.

Public Sub AddDataColumnMapping()
    ' ...
    ' create columnMappings
    ' ...
    Dim mapping As New DataColumnMapping( _
       "Description", "DataDescription")
    columnMappings.Add(CType(mapping, Object))
    Console.WriteLine("Column {0 added to column mapping collection {1.", _
       mapping.ToString(), columnMappings.ToString())
End Sub


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0