DataTableMapping.GetColumnMappingBySchemaAction Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a DataColumn from the specified DataTable using the specified MissingMappingAction value and the name of the DataColumn.
public:
System::Data::Common::DataColumnMapping ^ GetColumnMappingBySchemaAction(System::String ^ sourceColumn, System::Data::MissingMappingAction mappingAction);
public System.Data.Common.DataColumnMapping? GetColumnMappingBySchemaAction(string sourceColumn, System.Data.MissingMappingAction mappingAction);
public System.Data.Common.DataColumnMapping GetColumnMappingBySchemaAction(string sourceColumn, System.Data.MissingMappingAction mappingAction);
member this.GetColumnMappingBySchemaAction : string * System.Data.MissingMappingAction -> System.Data.Common.DataColumnMapping
Public Function GetColumnMappingBySchemaAction (sourceColumn As String, mappingAction As MissingMappingAction) As DataColumnMapping
- sourceColumn
- String
The name of the DataColumn.
- mappingAction
- MissingMappingAction
One of the MissingMappingAction values.
A data column.
The mappingAction
parameter was set to Error
, and no mapping was specified.
If the DataColumnMapping exists, it is returned.
If the DataColumnMapping does not exist, for a given MissingMappingAction, the following actions occur:
MissingMappingAction | Action taken |
---|---|
Passthrough |
Creates a DataColumnMapping with the specified source column name as both the source column name and the DataSet column name. This DataColumnMapping is not added to the collection. |
Error |
An InvalidOperationException is generated if the specified column mapping is missing. |
Ignore |
Gets a null value. |
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: