Re: Updating CLOBS - size does not shrink?
Date: Fri, 4 May 2001 12:18:26 +0200
Message-ID: <tf50bk6ekpav1b_at_beta-news.demon.nl>
"Joop Kaashoek" <jkaashoek_at_teckchek.com> wrote in message
news:3AF0F49A.5EE462B_at_teckchek.com...
> If you try to update a CLOB with less data than its current size, the
> CLOB size
> does not appear to shrink. So if the original size of the CLOB is 100
> bytes and
> you update it with a string of 80 bytes, the size stays at 100 and the
> data in the
> last 20 positions is old.
>
> I tried using two methods to update the clob, and both gave the same
result:
>
>
> oracle.sql.CLOB the_clob = ...;
>
>
>
> the_clob.putString(1, str);
>
>
> or
>
> DataOutputStream out = new
DataOutputStream(the_clob.getAsciiOutputStream());
> out.writeBytes(str);
> out.flush();
> out.close();
>
>
> This unexpected feature is not listed or warned about in any documentation
> that I came across sofar. Is there a work-around for this? Any help is
appreciated.
>
> I am using Oracle 8.1.5 and thin drivers (classes12.zip) on WebLogic 4.51
>
> Thanks,
>
> Joop Kaashoek
[Quoted] As long as the length is reported as 80 bytes I wouldn't bother. Oracle 8.1.5 has, BTW been desupported, and 8.1.6 will follow very soon. Looks like you need to upgrade.
Hth,
Sybrand Bakker, Oracle DBA Received on Fri May 04 2001 - 12:18:26 CEST