OracleParameter Class
Represents a parameter to an OracleCommand and optionally its mapping to a DataColumn. This class cannot be inherited.
System::MarshalByRefObject
System.Data.Common::DbParameter
System.Data.OracleClient::OracleParameter
Assembly: System.Data.OracleClient (in System.Data.OracleClient.dll)
The OracleParameter type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | OracleParameter() | Initializes a new instance of the OracleParameter class. |
![]() | OracleParameter(String, OracleType) | Initializes a new instance of the OracleParameter class that uses the parameter name and data type. |
![]() | OracleParameter(String, Object) | Initializes a new instance of the OracleParameter class that uses the parameter name and an OracleParameter object. |
![]() | OracleParameter(String, OracleType, Int32) | Initializes a new instance of the OracleParameter class that uses the parameter name, data type, and length. |
![]() | OracleParameter(String, OracleType, Int32, String) | Initializes a new instance of the OracleParameter class that uses the parameter name, data type, length, and source column name. |
![]() | OracleParameter(String, OracleType, Int32, ParameterDirection, String, DataRowVersion, Boolean, Object) | Initializes a new instance of the OracleParameter class that uses the parameter name, data type, size, direction, source column, source version, and other properties. |
![]() | OracleParameter(String, OracleType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object) | Initializes a new instance of the OracleParameter class that uses the parameter name, data type, length, source column name, parameter direction, numeric precision, and other properties. |
| Name | Description | |
|---|---|---|
![]() | DbType | Gets or sets the DbType of the parameter. (Overrides DbParameter::DbType.) |
![]() | Direction | Gets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter. (Overrides DbParameter::Direction.) |
![]() | IsNullable | Gets or sets a value that indicates whether the parameter accepts null values. (Overrides DbParameter::IsNullable.) |
![]() | Offset | Gets or sets the offset to the Value property. |
![]() | OracleType | Gets or sets the OracleType of the parameter. |
![]() | ParameterName | Gets or sets the name of the OracleParameter. (Overrides DbParameter::ParameterName.) |
![]() | Precision | Obsolete. Gets or sets the maximum number of digits used to represent the Value property. |
![]() | Scale | Obsolete. Gets or sets the number of decimal places to which Value is resolved. |
![]() | Size | Gets or sets the maximum size, in bytes, of the data within the column. (Overrides DbParameter::Size.) |
![]() | SourceColumn | Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value (Overrides DbParameter::SourceColumn.) |
![]() | SourceColumnNullMapping | Sets or gets a value which indicates whether the source column is nullable. This allows OracleCommandBuilder to correctly generate Update statements for nullable columns. (Overrides DbParameter::SourceColumnNullMapping.) |
![]() | SourceVersion | Gets or sets the DataRowVersion to use when you load Value. (Overrides DbParameter::SourceVersion.) |
![]() | Value | Gets or sets the value of the parameter. (Overrides DbParameter::Value.) |
| Name | Description | |
|---|---|---|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() | ResetDbType | Resets the type associated with this OracleParameter. (Overrides DbParameter::ResetDbType().) |
![]() | ResetOracleType | Resets the type associated with this OracleParameter. |
![]() | ToString | Gets a string that contains the ParameterName. (Overrides Object::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICloneable::Clone | For a description of this member, see ICloneable::Clone. |
![]() ![]() | IDbDataParameter::Precision | Indicates the precision of numeric parameters. (Inherited from DbParameter.) |
![]() ![]() | IDbDataParameter::Scale | For a description of this member, see IDbDataParameter::Scale. (Inherited from DbParameter.) |
Parameter names are not case-sensitive.
When querying an Oracle database using the Microsoft OLE DB Provider for Oracle (MSDAORA) and the ODBC.NET Framework Data Provider, using the LIKE clause to query values in fixed-length fields may not return all expected matches. The reason is that when Oracle matches values for fixed-length fields in a LIKE clause, it matches the entire length of the string, including any padding trailing spaces. For example, if a table in an Oracle database contains a field named "Field1" that is defined as char(3), and you enter the value "a" into a row of that table, the following code will not return the row.
This is because Oracle stores the column value as "a " (padding "a", with trailing spaces, to the fixed field length of 3), which Oracle does not treat as a match for the parameter value of "a" in the case of a LIKE comparison of fixed-length fields.
To resolve this problem, append a percentage ("%") wildcard character to the parameter value ("a%"), or use an SQL = comparison instead.
The following example creates multiple instances of OracleParameter through the OracleParameterCollection within the OracleDataAdapter. These parameters are used to select data from the database and place the data in the DataSet. This example assumes that a DataSet and an OracleDataAdapter have already been created by using the appropriate schema, commands, and connection.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

