asp.net.ph

DataTableMappingCollection GetByDataSetTable Method

System.Data.Common Namespace   DataTableMappingCollection Class


Returns a DataTableMapping object with the specified DataSetTable name.

[ VB ]
Public Function GetByDataSetTable ( _
   ByVal dataSetTable As String _
) As DataTableMapping

[ C# ]
public DataTableMapping GetByDataSetTable (
   string dataSetTable
);

[ C++ ]
public: DataTableMapping* GetByDataSetTable (
   String* dataSetTable
);

[ JScript ]
public function GetByDataSetTable (
   dataSetTable : String
) : DataTableMapping;

Parameters

dataSetTable
The case-insensitive name of the DataSetTable to find.

Return Value

The DataTableMapping object with the specified DataSetTable name.

Exceptions


Exception Type Condition
ArgumentException Thrown if the dataSetTable parameter is a null reference ( Nothing in Visual Basic ).

Example

The following example demonstrates using the GetByDataSetTable method to return a specified DataTableMapping object.

public void FindDataTableMapping ( DataAdapter myAdapter ) {
   // get table mappings
   DataTableMappingCollection myTables = myAdapter.TableMappings;
   if ( myTables.Contains ( "Employees" ) ) {
      DataTableMapping myTable = myTables.GetByDataSetTable ( "tblEmployees" );
   }
}
  C# VB

See Also

DataTableMappingCollection Members Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note