Title: RE: [jdjlist] Re: CLOB in Java
I've used the Oracle CLOB classes very successfully in the past to write large chunks of text data (>1Mb) into the database.
 
ResultSet.getString() would only work on the first 4000 characters I think, some sort of limit like that, i.e. the first block of data, never the subsequent ones. The problem with that of course is that if the data exceeds that limit, you're screwed, and if the data never exceeds that limit, why aren't you using a more efficient column type in the first place, like VARCHAR2? You know CLOBS can't be keys and aren't (can't be) indexed or searched without the CONTEXT cartridge, all sorts of restrictions that would make a VARCHAR-sized CLOB field a complete waste of time. 
 
regs
scot.

I know I may get a frown or two, but for a "small" CLOB I was able to use getString() in both the Oracle thin driver and Weblogic OCI.  Strangely, when I tried to use streams, I encountered some difficulties -- I think it used to hang with one of the drivers, but this was a while ago, so I am not sure.

The only gotcha (as I see in my comments) was that the CLOB has to be the very first column in your query.

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Save Bandwidth! Clean up your posts before replying
____________________________________________________

Reply via email to