Oracle Error ORA-21301: not initialized in object mode

Oracle Error Message

ORA-21301: not initialized in object mode

Reason for the Error

This function requires the OCI process to be initialized in object mode.

Solution

Specify OCI_OBJECT mode when calling OCIInitialize().