DataColumnMapping.GetDataColumnBySchemaAction Method

Definition

Gets a DataColumn from the given DataTable.

Overloads

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(DataTable, Type, MissingSchemaAction) that can be called without instantiating a DataColumnMapping object.

GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction)

Gets a DataColumn from the given DataTable using the MissingSchemaAction and the DataSetColumn property.

public:
 System::Data::DataColumn ^ GetDataColumnBySchemaAction(System::Data::DataTable ^ dataTable, Type ^ dataType, System::Data::MissingSchemaAction schemaAction);
public System.Data.DataColumn GetDataColumnBySchemaAction (System.Data.DataTable? dataTable, Type dataType, System.Data.MissingSchemaAction schemaAction);
public System.Data.DataColumn GetDataColumnBySchemaAction (System.Data.DataTable dataTable, Type dataType, System.Data.MissingSchemaAction schemaAction);
member this.GetDataColumnBySchemaAction : System.Data.DataTable * Type * System.Data.MissingSchemaAction -> System.Data.DataColumn
Public Function GetDataColumnBySchemaAction (dataTable As DataTable, dataType As Type, schemaAction As MissingSchemaAction) As DataColumn

Parameters

dataTable
DataTable

The DataTable to get the column from.

dataType
Type

The Type of the data column.

schemaAction
MissingSchemaAction

One of the MissingSchemaAction values.

Returns

DataColumn

A data column.

See also

GetDataColumnBySchemaAction(String, String, DataTable, Type, MissingSchemaAction)

A static version of GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction) that can be called without instantiating a DataColumnMapping object.

public:
 static System::Data::DataColumn ^ GetDataColumnBySchemaAction(System::String ^ sourceColumn, System::String ^ dataSetColumn, System::Data::DataTable ^ dataTable, Type ^ dataType, System::Data::MissingSchemaAction schemaAction);
public static System.Data.DataColumn? GetDataColumnBySchemaAction (string sourceColumn, string dataSetColumn, System.Data.DataTable? dataTable, Type dataType, System.Data.MissingSchemaAction schemaAction);
public static System.Data.DataColumn GetDataColumnBySchemaAction (string sourceColumn, string dataSetColumn, System.Data.DataTable dataTable, Type dataType, System.Data.MissingSchemaAction schemaAction);
static member GetDataColumnBySchemaAction : string * string * System.Data.DataTable * Type * System.Data.MissingSchemaAction -> System.Data.DataColumn
Public Shared Function GetDataColumnBySchemaAction (sourceColumn As String, dataSetColumn As String, dataTable As DataTable, dataType As Type, schemaAction As MissingSchemaAction) As DataColumn

Parameters

sourceColumn
String

The case-sensitive column name from a data source.

dataSetColumn
String

The column name, which is not case sensitive, from a DataSet to map to.

dataTable
DataTable

An instance of DataTable.

dataType
Type

The data type for the column being mapped.

schemaAction
MissingSchemaAction

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

Returns

DataColumn

A DataColumn object.

See also

Applies to