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 insert fails using setCharacterStream when data > 4000 chars

264686Nov 29 2003 — edited Dec 24 2003
I am trying to insert a row containing a CLOB, using a prepared statement. I am using setCharacterStream for portability. It works fine up to around 4000 characters of CLOB data, at which point the statement updates, but commit hangs for a while and then I get a TNS end-of-file error. This occurs with both the classes12.zip and ojdbc14.jar drivers, against a 9.0.1.0.0 database.

If I change the column type from CLOB to LONG, the same code works perfectly, no matter what the length of the data being inserted.

What gives? I'd like to use CLOBs because LONGs appear to be going the way of the dinosaur.

thanks,
markl
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 21 2004
Added on Nov 29 2003
9 comments
3,619 views