Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Clob Updating...Please HELP I'm Really stuck on this!

843854Sep 30 2001 — edited Jan 11 2005
Situation: I am working with JDBC 2.0, jdk 1.2. I do not have access to the oracle.sql.Clob

Problem: I can get the Clob out of the data base, using
a select...for update, resultSet.getClob(). But I can find no way to update the Clob before saving it.

Every comment on this topic that I can locate says to use the getCharacterOutputStream() on the Clob, but that is an oracle.sql.Clob method. In the jdk 1.4, This will be cleared up since they are adding a setCharacterStream method to the Clob which I could then use. But I don't have that version of the jdk.

I should say that I am able to update the clob doing the following:

BufferedReader aReader = new BufferedReader(new FileReader("filename"));
CreatePreparedStatement("Update Table set Clob_Col = ?");
setCharacterStream(1, aReader, filelength);
execute();

But this has that 4000 character limit on it and truncates my file.

I really need help with this, I have been searching for answers for days. I believe the issue I am facing is the same as is reported in bug: 4481479, but the person who reported this bug had access to the oracle.sql.clob and no other workaround is listed.

Please help me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2005
Added on Sep 30 2001
20 comments
1,414 views