This documentation is archived and is not being maintained.

OracleParameterCollection.Item Property (String)

Gets or sets the OracleParameter with the specified name.

Namespace: System.Data.OracleClient
Assembly: System.Data.OracleClient (in

Public Default Property Item ( _
	parameterName As String _
) As OracleParameter
Dim instance As OracleParameterCollection
Dim parameterName As String
Dim value As OracleParameter

value = instance(parameterName)

instance(parameterName) = value
/** @property */
public OracleParameter get_Item (String parameterName)

/** @property */
public void set_Item (String parameterName, OracleParameter value)

JScript supports the use of indexed properties, but not the declaration of new ones.



The name of the parameter to retrieve.

Property Value

The OracleParameter with the specified name.

Exception typeCondition


The name specified does not exist.

The following example searches for an OracleParameter with a given .Data.OracleClient.OracleParameter.ParameterName within an OracleParameterCollection. If the parameter exists, the example displays the name and index of the parameter. If the parameter does not exist, the example displays an error. This example assumes that an OracleParameterCollection has already been created.

Public Sub SearchOracleParams()
    ' ...
    ' create OracleParameterCollection parameters
    ' ...
    If Not parameters.Contains("DName") Then
        Console.WriteLine("ERROR: no such parameter in the collection")
        Console.WriteLine("Name: " & parameters("DName").ToString() & _
            "Index: " & parameters.IndexOf("DName").ToString())
    End If
End Sub 

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1