Oracle CLOB - update fails after 333 chars

I have the most bizarre thing happening!

I have an Oracle (8.1) table containing a CLOB column. When I insert a row using an InsertSQL adapter service, the CLOB field is assigned correctly, along with all the other fields. However, when I try to update a row using an UpdateSQL adapter service, the CLOB field is assigned NULL if the incoming CLOB string exceeds 333 characters! It doesn’t seem to be related to the overall SQL statement size, as I can increase the length of other non-CLOB fields in the update without affecting the length at which the CLOB is nulled. There’s no special character near position 333.

I could understand hitting a thin driver limit at 2000 or 4000 or 64000 characters, but 333???

Using the oracle oracle/product/8.1.7/jdbc/lib/classes12.zip driver.

Hi,

CLOBs are not supported by Oracle Thin Driver before 10g.

You can use the 10g Driver (Current Version: 10.1.0.4)to connect to your Oracle 8i database.

After that you should be able to use CLOBs with Thin Driver as expected.

Check JDBCAdapter Developer Guide, there is a comment related to this.

When running your IS in Java 1.4 you should use the ojdbc14.jar instead of classes12.jar/zip.

Regards,
Holger

Hi,

According to the JDBC Adapter Users Guide 6.0.3, CLOBs are supported prior to 10g, as long as they’re under the magic 4KB size. Consequently, I’m intrigued by why the UpdateSQL service fails at 334 bytes.

We don’t have ojbdc14.jar on our systems. I will chat to the DBAs and SYSADMs about that, and about updating to 10g.

Thanks,
Michael

Hi Michael,

you can get the 10g driver via Oracle Technet (OTN) for free.
Just register there.

Regards,
Holger