File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes use of CLOB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "use of CLOB " Watch "use of CLOB " New topic

use of CLOB

dr priti

Joined: Mar 05, 2001
Posts: 18
Hi folks,
I want to take text from text area and insert it into CLOB datatype of Oracle8i database. But I could insert upto 4000 chars. What could be the problem. As per my knowledge CLOB datatype size is 4GB. Thanx in advance for any replies.
arunkumar hk

Joined: Mar 03, 2001
Posts: 5
A direct insert into the CLOB field does not work if the data exceeds 4000 characters.
Use the DBMS_LOB pacakage to access and manipulate the (C)LOB data.
The feature of loading data directly from varchar2 to a CLOB field using an INSERT statement is not available in 8.0.x and 8.1.5. This feature is available in 8.1.6 and later versions.
martin samm
Ranch Hand

Joined: Nov 09, 2000
Posts: 31
another way to put information into a CLOB is to select the clob field you wish to populate, and then open up a stream to it and then 'send' the information to it.
This is well documented on Oracle's TECHNET site ( - look in the Documentation, Oracle 8i, Java Development section

martin samm<BR>
I agree. Here's the link:
subject: use of CLOB
It's not a secret anymore!