Writing CLOB field in a java Object
421457May 17 2004 — edited Sep 24 2004Hi,
I have an Oracle OBJECT type that has 2 CLOB fields and I am trying to read and write these objects using JDBC and he SQLData interface.
Read the CLOB fields is fine, however writing the CLOB fields is resuling in the error:
ORA-17059
Fail to convert to internal representation
When I read using the SQLInput interface I use the readClob() method.
However, when I write using the SQLOutput interface I do not have a Clob object and therefore cannot use the writeClob() method.
My Client side Java field for the Clob is a String so I am converting the String to a character stream and then using SQLOutput.writeCharacterStream(). However this yeilds an ArrayIndexOutOfBounds exception.
What am I doing wrong here?
How are you supposed to write to an OracleObject CLOB field from within the writeSQL() method of the SQLData interface?