System.Data.Common.DataTableMappingCollection.GetTableMappingBySchemaAction Method

Gets a System.Data.Common.DataColumnMapping object with the specified source table name and System.Data.DataSet table name, using the given System.Data.MissingMappingAction.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public static DataTableMapping GetTableMappingBySchemaAction (DataTableMappingCollection tableMappings, string sourceTable, string dataSetTable, System.Data.MissingMappingAction mappingAction)

Parameters

tableMappings
The System.Data.Common.DataTableMappingCollection collection to search.
sourceTable
The case-sensitive name of the mapped source table.
dataSetTable
The name, which is not case-sensitive, of the mapped System.Data.DataSet table.
mappingAction
One of the System.Data.MissingMappingAction values.

Returns

A System.Data.Common.DataTableMapping object.

Remarks

If the System.Data.Common.DataTableMapping exists in the collection, it is returned.

If the System.Data.Common.DataTableMapping does not exist in the collection for a given System.Data.MissingMappingAction, the following happens:

Passthrough

Creates a System.Data.Common.DataTableMapping object with the given sourceTable as the source table name and dataSetTable as the System.Data.DataSet table name. The created System.Data.Common.DataTableMapping object is not added to the collection.

Error

An exception is generated. The dataSetTable parameter is ignored.

Ignore

Gets null. The dataSetTable parameter is ignored.

Requirements

Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0