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

ERRORstream must be loaded before its handle is freed
CAUSEAn attempt was made to free a stream handle after conversion but before the stream was loaded.
ACTIONLoad 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.