Ocilobread() Returns "Ora-03145: I/O Streaming Direction Error" (Doc ID 788067.1)

Last updated on FEBRUARY 17, 2010

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.7
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 11.1.0.7
Oracle Database 11.1.0.7
Oracle Client 11.1.0.7

Symptoms

You are developing an application that communicates with the Oracle database using OCI.
Everything worked fine until you migrated your application from ANSI to Unicode, and replaced
all text data in Oracle with Unicode versions; for example, you replaced CLOB by NCLOB.

Now you are experiencing the following error:

the OCI call OCILobRead() sometimes returns the
error message "ORA-03145: I/O streaming direction error".

The circumstances under which this error occurs:

- An UPDATE statement that sets a NCLOB column to NULL must precede the SELECT statement.
- The parameter value_sz of the OCIBindByName() must be larger than 4001.

The error does not occur if any of the following is true:

- The UPDATE statement is missing.
- The data type of the column affected by the UPDATE statement is CLOB instead of NCLOB.
- The value_sz parameter is less than or equal to 4001.

Generates error even with 10.2.0.4 Client pointing to 11.1.0.7 Database.
The application works fine with
10.2.0.4 Client pointing to 10.2.0.4 Database
11.1.0.7 Client pointing to 10.2.0.4 Database

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms