DataColumnMappingCollection.GetDataColumn 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
一个静态方法,它返回未实例化的 DataColumn 对象的 DataColumnMappingCollection 对象。
public:
static System::Data::DataColumn ^ GetDataColumn(System::Data::Common::DataColumnMappingCollection ^ columnMappings, System::String ^ sourceColumn, Type ^ dataType, System::Data::DataTable ^ dataTable, System::Data::MissingMappingAction mappingAction, System::Data::MissingSchemaAction schemaAction);
public static System.Data.DataColumn? GetDataColumn (System.Data.Common.DataColumnMappingCollection? columnMappings, string sourceColumn, Type? dataType, System.Data.DataTable dataTable, System.Data.MissingMappingAction mappingAction, System.Data.MissingSchemaAction schemaAction);
public static System.Data.DataColumn GetDataColumn (System.Data.Common.DataColumnMappingCollection columnMappings, string sourceColumn, Type dataType, System.Data.DataTable dataTable, System.Data.MissingMappingAction mappingAction, System.Data.MissingSchemaAction schemaAction);
static member GetDataColumn : System.Data.Common.DataColumnMappingCollection * string * Type * System.Data.DataTable * System.Data.MissingMappingAction * System.Data.MissingSchemaAction -> System.Data.DataColumn
Public Shared Function GetDataColumn (columnMappings As DataColumnMappingCollection, sourceColumn As String, dataType As Type, dataTable As DataTable, mappingAction As MissingMappingAction, schemaAction As MissingSchemaAction) As DataColumn
参数
- columnMappings
- DataColumnMappingCollection
- sourceColumn
- String
数据源中区分大小写的列名。
- dataType
- Type
正被映射的列的数据类型。
- mappingAction
- MissingMappingAction
MissingMappingAction 值之一。
- schemaAction
- MissingSchemaAction
确定现有 DataSet 架构与传入数据不匹配时需要执行的操作。
返回
DataColumn 对象。