GetCustomObject(OracleUdtFetchOption, int)

This method returns the object that the specified REF references, as a custom type, using the specified fetch option and depth level.

Declaration

// C#
public object GetCustomObject(OracleUdtFetchOption fetchOption, int depthLevel);

Parameters

Return Value

A custom object that represents the object that the specified REF references.

Exceptions

InvalidOperationException - The specified connection is not open, or a valid custom type has not been registered for the type of the referenced object.

Remarks

This method returns a custom type determined by the UDT mappings on the specified connection.

If the object that the REF references contains nested REF attributes, the depthLevel can be specified to optimize the subsequent object retrieval. The value of depthLevel determines the number of levels that are optimized.

For example, if the depthLevel is specified as two, the optimization is applied to all top-level nested REF attributes in the object being fetched and also to all nested REF attributes within the objects referenced by the top-level nested REF attributes.

The connection must be opened explicitly by the application. This method does not open the connection implicitly.

The application can use the OracleUdtFetchOption method to control the copy of the Object that is returned according to the specified option:

See Also: