System.Data.Common Namespace DataTableMappingCollection Class
Removes the DataTableMapping with the given SourceTable name from the collection.
[ VB ] NotOverridable Overloads Public Sub RemoveAt ( _ ByVal sourceTable As String _ ) Implements ITableMappingCollection.RemoveAt [ C# ] public void RemoveAt ( string sourceTable ); [ C++ ] public: __sealed void RemoveAt ( String* sourceTable ); [ JScript ] public function RemoveAt ( sourceTable : String );
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.
public void SearchTableMappings ( DataAdapter myAdapter ) { DataTableMappingCollection myTables = myAdapter.TableMappings; if ( myTables.Contains ( "tmpOrders" ) myTables.RemoveAt ( "tmpOrders" ); }
Public Sub SearchTableMappings ( ByVal myAdapter As DataAdapter ) Dim myTables As DataTableMappingCollection = myAdapter.TableMappings If myTables.Contains ( "tmpOrders" ) Then myTables.RemoveAt ( "tmpOrders" ); End If End Sub
DataTableMappingCollection Members DataTableMappingCollection.RemoveAt Overload List
© 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