dcsimg
Handling clob values in JBDC in a database independent way
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Srinivas_Lakhanigam
Posted On:   Wednesday, April 11, 2001 09:24 AM

We want to insert clob values into an Oracle database. We are using Oracle's thin driver. We dont want to use any Oracle specific methods in the code.

We tried using inline inserts, but we got an error from Oracle saying "String literal too long". We tried to insert using the PreparedStatement.setCharacterStream() method, but we got an error from Oracle "Connection reset by peer".

Sun's JDBC documents has such stupid code for handling CLOBs, that it is hard to believe that it is published by Sun !!!

Can anyone point me in the right direction ?

Thanks in advance.

Re: Handling clob values in JBDC in a database independent way

Posted By:   Thanabalasingam_Kamalanesan  
Posted On:   Monday, April 16, 2001 10:07 PM

first store empty_clob().then get resultset by sql query(in this case you want to lock record for this purposeyou can use "for update").
clob.getcharcterstream().then you can handle by java.io.*, and you can directly write on that charcterstream.
About | Sitemap | Contact