asp.net.ph

OleDbParameterCollection.RemoveAt Method ( Int32 )

System.Data.OleDb Namespace   OleDbParameterCollection Class


Removes the OleDbParameter at the specified index from the collection.

[ VB ]
Overloads Overridable Public Sub RemoveAt ( _
   ByVal index As Integer _
)

[ C# ]
public virtual void RemoveAt (
   int index
);

[ C++ ]
public: virtual void RemoveAt (
   int index
);

[ JScript ]
public function RemoveAt (
   index : int
);

Parameters

index
The zero-based index of the parameter to remove.

Implements

IList.RemoveAt

Exceptions


Exception Type Condition
IndexOutOfRangeException The specified index does not exist.

Example

The following example first uses the Contains property to find an OleDbParameter at the specified index within the Parameters collection of a specifed OleDbCommand object. If the parameter exists, the example removes it.

public void SearchOleDbParams ( OleDbCommand myCmd ) {
   OleDbParameterCollection myParams = myCmd.Parameters;
   if ( myParams.Contains ( myParams [ 3 ] )
      myCmd.Parameters.RemoveAt ( 3 );

}
  C# VB

See Also

OleDbParameterCollection Members   OleDbParameterCollection.RemoveAt Overload List 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