GetByDataSetTable Method

DataTableMappingCollection.GetByDataSetTable Method (String)

 

Gets the DataTableMapping object with the specified DataSet table name.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

public DataTableMapping GetByDataSetTable(
	string dataSetTable
)

Parameters

dataSetTable
Type: System.String

The name, which is not case-sensitive, of the DataSet table to find.

Return Value

Type: System.Data.Common.DataTableMapping

The DataTableMapping object with the specified DataSet table name.

The following example searches for a DataTableMapping within the collection. If the object exists, it is returned. The example assumes that a DataTableMappingCollection collection and a DataTableMapping object have been created.

public void FindDataTableMapping() 
{
    // ...
    // create mappings and mapping
    // ...
    if (mappings.IndexOfDataSetTable("datacategories") != -1)
        mapping = mappings.GetByDataSetTable("datacategories");
}

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft