DataColumnMappingCollection::GetDataColumn Method (DataColumnMappingCollection^, String^, Type^, DataTable^, MissingMappingAction, MissingSchemaAction)

 

A static method that returns a DataColumn object without instantiating a DataColumnMappingCollection object.

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

public:
static DataColumn^ GetDataColumn(
	DataColumnMappingCollection^ columnMappings,
	String^ sourceColumn,
	Type^ dataType,
	DataTable^ dataTable,
	MissingMappingAction mappingAction,
	MissingSchemaAction schemaAction
)

Parameters

columnMappings
Type: System.Data.Common::DataColumnMappingCollection^

The DataColumnMappingCollection.

sourceColumn
Type: System::String^

The case-sensitive column name from a data source.

dataType
Type: System::Type^

The data type for the column being mapped.

dataTable
Type: System.Data::DataTable^

An instance of DataTable.

mappingAction
Type: System.Data::MissingMappingAction

One of the MissingMappingAction values.

schemaAction
Type: System.Data::MissingSchemaAction

Determines the action to take when the existing DataSet schema does not match incoming data.

Return Value

Type: System.Data::DataColumn^

A DataColumn object.

.NET Framework
Available since 2.0
Return to top
Show: