DataColumnMapping.GetDataColumnBySchemaAction 方法

定义

从给定的 DataColumn 中获取 DataTable

重载

GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction)

使用 DataColumnDataTable 属性从给定的 MissingSchemaAction 获取 DataSetColumn

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

GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction) 的静态版本,可以在不实例化 DataColumnMapping 对象的情况下调用。

GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction)

Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs

使用 DataColumnDataTable 属性从给定的 MissingSchemaAction 获取 DataSetColumn

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

参数

dataTable
DataTable

从中获取列的 DataTable

dataType
Type

数据列的 Type

schemaAction
MissingSchemaAction

MissingSchemaAction 值之一。

返回

数据列。

另请参阅

适用于

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

Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs

GetDataColumnBySchemaAction(DataTable, Type, MissingSchemaAction) 的静态版本,可以在不实例化 DataColumnMapping 对象的情况下调用。

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

参数

sourceColumn
String

数据源中区分大小写的列名。

dataSetColumn
String

DataSet 中要映射到的列名(该名称不区分大小写)。

dataTable
DataTable

DataTable 的一个实例。

dataType
Type

正被映射的列的数据类型。

schemaAction
MissingSchemaAction

确定现有 DataSet 架构与传入数据不匹配时需要执行的操作。

返回

DataColumn 对象。

另请参阅

适用于