GetValue(OracleConnection, object, int)

This method gets the attribute or elements from the specified Oracle UDT, using the specified index.

Declaration

// C#
public static object GetValue(OracleConnection con, object Udt, int attrIndex,);

Parameters

Return Value

An object representing the returned attribute or collection elements.

Exceptions

ArgumentOutOfRangeException - The specified index is not a valid attribute index.

Remarks

The IOracleCustomType.ToCustomObject method invokes OracleUdt.GetValue method passing it the con and Udt parameters. The OracleUdt.GetValue method returns these types of object:

In the case of NULL attribute values, the appropriate null representation of the type is returned. For example, for attributes that are represented as Custom Types and Provider Specific Types, the static Null property of the type is returned. For attributes that are represented as Nullable types, for example, System.String and System.Array Types, null is returned, and for all other remaining built-in types such as Int32 and DateTime DBNull.Value is returned.

If the type of the member is mapped to a .NET Decimal, and SuppressGetDecimalInvalidCastException is set to true on OracleConfiguration, OracleConnection, OracleDataAdapter, or OracleDataReader associated with the UDT, then it returns a rounded-off 28 or 29 precision Oracle NUMBER value that can be represented as a .NET Decimal.

See Also: