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

Oracle Error Message

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

Reason for the Error

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

Solution

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.