At 05:44 PM 7/26/2001, you wrote:

>I m using Oracle 8.1.7 s JDBC driver (classes12) with JDK 1.3.0. And it 
>seems to have some problems to handle CLOB. But there has not been any 
>problem except CLOB problem up to now.

Interesting.  No problems handling CLOBs here except when using a Type 1 or 
2 driver.  It seems in JDK 1.3.x Sun is preventing sharing of the c++ 
library for one reason or another, which means you can only load it once, 
which means that your connection pooler can only be used once on the 
machine for all your apps.

What we did was move everything to the Type 4 driver (Thin client), and 
write code to handle CLOB insert/updates through Oracle's DBMS_LOB procedures.

The only trick to it is that every time you want to update a CLOB, you have 
to re initialize it with EMPTY_LOB(), then do the update with the new 
data.  If you don't do that you will end up with incorrect data.  The data 
'corruption' if you don't do the EMPTY_LOB() manifests itself in the form 
of old data over new data.  This is because when you do an update, and the 
number of bytes in the data is smaller than the number of bytes in the 
original data, the CLOB will get updated with the new number of chars, but 
anything over that remains in the CLOB column.  YUK.  Of course if anyone 
knows another way around this please let me know :-)

Hope this helps.
R


Robert S. Sfeir
Director of Software Development
PERCEPTICON corporation,
        in Joint Venture With JTransit
San Francisco, CA 94123
pw - http://www.percepticon.com/
jw - http://jtransit.com
e- [EMAIL PROTECTED]


Reply via email to