Oracle Solution for Error ora-39771

Solution for Oracle Error ORA-39771

ORA-39771: stream must be loaded before its handle is freed

What triggered the Error:

An attempt was made to free a stream handle after conversion but before the stream was loaded.

What should we do to fix it:

Load the stream until OCI_SUCCESS, OCI_NEED_DATA or OCI_NO_DATA is returned before attempting to free the stream handle. If OCI_NEED_DATA is returned, another stream must be loaded to complete last row.