That's a very good point -- like I said -- this will get a frown or two!!
:-)
Greg
-----Original Message-----
From: David Gallardo [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 29, 2002 9:14 PM
To: JDJList
Subject: [jdjlist] Re: CLOB in Java
More precisely: if a Clob is 4K or less, the Clob value is stored
inline--directly in the table. If a Clob is larger than 4K, a Clob
locator, rather than the Clob value, is stored inline and the Clob value is
stored out-of-line (in another segment or tablespace).
As it happens, 4K is also the limit of VARCHAR2, which probably explains,
(same internal code?), why getString() works with inline but not
out-of-line Clobs (or only with the first 4K of out-of-line Clobs).
But you're absolutely correct in your essential point: if you're going to
use getString(), you need to ensure that the data is never larger than 4K
and if you know that, you should be using VARCHAR2 and not Clob.
- David Gallardo
At 10:15 AM 9/30/2002 +1000, Scot Mcphee wrote:
>[...]
>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?
[...]
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Save Bandwidth! Clean up your posts before replying
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________
