The permissible values for built-in typecodes are specified in "Typecodes". Additional information about built-in types (precision, scale for numbers, character set information for VARCHAR2s, and so on) if any, must be set with a subsequent call to OCITypeSetBuiltin(). Finally, you must use OCITypeEndCreate() to finish the creation process.

dur (IN)

The allocation duration for the type. It is one of these:

A user duration that was previously created. It can be created by using OCIDurationBegin().

A predefined duration, such as OCI_DURATION_SESSION.

type (OUT)

The OCIType (Type Descriptor) that is being constructed.

Comments

To create a persistent named type, use the SQL statement CREATETYPE. Transient types have no identity. They are pure values.

OCITypeEndCreate()

Purpose

Finishes construction of a type description. Subsequently, only access is allowed.

The OCI error handle. If there is an error, it is recorded in err, and this function returns OCI_ERROR. Obtain diagnostic information by calling OCIErrorGet().

type (IN/OUT)

The type description that is being constructed.

builtin_info (IN)

Provides information about the built-in type (precision, scale, character set, and so on). It is obtained by allocating an OCIParam parameter handle and setting type information in the OCIParam using OCIAttrSet() calls.

OCITypeSetCollection()

Purpose

Sets collection type information. This call can be made only if the type has been constructed with a collection typecode.