System.Data.OleDb Namespace OleDbParameterCollection Class
Clears the collection of any parameters.
[ VB ]
Public Sub Clear ( )
[ C# ]
public void Clear ( );
[ C++ ]
public: void Clear ( );
[ JScript ]
public function Clear ( );
Use this method to remove all OleDbParameter objects from the Parameters collection of a specified command. To remove a particular OleDbParameter from the collection, use either the Remove or RemoveAt method.
This method resets the Parameters.Count property to 0.
The following example gets the OleDbParameterCollection of a given OleDbCommand, then clears the collection.
private void ClearParams ( OleDbCommand cmd ) {
OleDbParameterCollection myParams = cmd.Parameters;
myParams.Clear ( );
}
Private Sub ClearParams ( ByVal cmd As OleDbCommand )
Dim myParams As OleDbParameterCollection = cmd.Parameters
myParams.Clear ( )
End Sub |
|
C# |
VB |
OleDbParameterCollection Members