Export (0) Print
Expand All

OracleParameterCollection.Remove Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Removes the specified OracleParameter from the collection.

[Visual Basic]
Public Overridable Sub Remove( _
   ByVal value As Object _
) Implements IList.Remove
[C#]
public virtual void Remove(
 object value
);
[C++]
public: virtual void Remove(
 Object* value
);
[JScript]
public function Remove(
   value : Object
);

Parameters

value
The OracleParameter object to remove from the collection.

Implements

IList.Remove

Exceptions

Exception Type Condition
SystemException The parameter does not exist.
InvalidCastException The parameter is not a valid OracleParameter.

Example

[Visual Basic, C#, C++] The following example searches for an OracleParameter object in an OracleParameterCollection. If the parameter exists, it is removed. This example assumes that an OracleParameterCollection has already been created.

[Visual Basic] 
Public Sub SearchOracleParams()
    ' ...
    ' create OracleParameterCollection myParameters and OracleParameter myNewParam
    ' ...
    If myParameters.Contains(myNewParam) Then
        myParameters.Remove(myNewParam)
    End If
End Sub 'SearchOracleParams 

[C#] 
public void SearchOracleParams() {
    // ...
    // create OracleParameterCollection myParameters and OracleParameter myNewParam
    // ...
    if (myParameters.Contains(myNewParam))
       myParameters.Remove(myNewParam);
 }

[C++] 
public:
void SearchOracleParams() {
    // ...
    // create OracleParameterCollection myParameters and OracleParameter myNewParam
    // ...
    if (myParameters->Contains(myNewParam))
       myParameters->Remove(myNewParam);
 }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

OracleParameterCollection Class | OracleParameterCollection Members | System.Data.OracleClient Namespace

Show:
© 2014 Microsoft