asp.net.ph

DataTableMappingCollection.RemoveAt Method

System.Data.Common Namespace   DataTableMappingCollection Class


Removes a specified DataTableMapping from the collection.

Overload List

1. Removes the DataTableMapping at the specified index.

2. Removes the DataTableMapping with the specified SourceTable name.


Example

The following example first uses the Contains method to find a DataTableMapping with the specified source table name within the TableMappings collection of a specifed DataTableMapping object. If the mapping exists, the example removes it.

NOTE: This example uses one of the overloaded versions of RemoveAt. For other examples that may be available, see the individual overload topics.

public void SearchTableMappings ( DataAdapter myAdapter ) {
   DataTableMappingCollection myTables = myAdapter.TableMappings;
   if ( myTables.Contains ( "tmpOrders" )
      myTables.RemoveAt ( "tmpOrders" );

}
  C# VB

See Also

DataTableMappingCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

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

You can help support asp.net.ph