Value

This property specifies the value of the Parameter.

Declaration

// C#
public override object Value { get; set; }

Property Value

An object.

Implements

IDataParameter

Exceptions

ArgumentException - The Value property specified is invalid.

InvalidArgumentException- The Value property specified is invalid.

Remarks

Default = null

If the OracleParameter object is used for Array Bind or PL/SQL Associative Array, Value is an array of parameter values.

The Value property can be overwritten by OracleDataAdapter.Update().

The provider attempts to convert any type of value if it supports the IConvertible interface. Conversion errors occur if the specified type is not compatible with the value.

When sending a null parameter value to the database, the user must specify DBNull, not null. The null value in the system is an empty object that has no value. DBNull is used to represent null values. The user can also specify a null value by setting Status to OracleParameterStatus.NullValue. In this case, the provider sends a null value to the database.

If neither OracleDbType nor DbType are set, their values can be inferred by Value. Please see the following for related information:

For input parameters the value is:

For output parameters the value is:

When array binding is used with:

When PL/SQL Associative Array binding is used with:

Each parameter should have a value. To bind a parameter with a null value, set Value to DBNull.Value, or set Status to OracleParameterStatus. NullInsert.

If the data type specified is OracleDbType.Decimal, precision is not set or set to 0, and OracleConfiguration or OracleConnection SuppressGetDecimalInvalidCastException is set to true, then a rounded-off 28 or 29 precision Oracle NUMBER value is return that can be represented as a .NET Decimal.

For vectors, if OracleParameter.Value is a .NET numeric type, then ODP.NET converts the value to the numeric format specified in the bind type (OracleDbType.Vector*) in OracleParameter unless it is a BINARY vector. In the BINARY case, the parameter values must be a .NET byte[] or string type, such as .NET string or OracleString.

See Also: