Way to Handle CLOB
U Can handle CLOB as follows:
String str = "The String to be converted";
Connection conn = DriverManager.getConnection("url","username","password");
PreparedStatement ps = conn.prepareStatement("INSERT
INTO YOURTABLE VALUES (?)");
//The column is a CLOB column
"Paul Clapham" <email@example.com> wrote:
>When you look at the documentation for the Clob interface, it doesn't
>mention any methods for writing a stream into one. Reading a stream from
>one, yes, but not writing. The interface appears to be for read-only CLOBS,
>unless you can tell me the names of the methods that I didn't see.
>Syed Zulfiqar <firstname.lastname@example.org> wrote in message
>> I haven't worked with CLOB but I think u donīt create a clob directly
>> of some String, instead you first create a pointer to the column to which
>> you wanīt to insert the CLOB into. That means that you first create an
>> into the db. Then you fetch this empty clob from the db and finally you
>> your stream into the clob. Vice versa if you would like to get the clob
>> the db, You select the lob, then you create an inputstream from there
>> read it into some outputstream.
>> Hope this may give some clear understanding.
>> syed zulfiqar
>> "reuben" <email@example.com> wrote:
>> >i would like to insert a huge string value from my java servelet into
>> >oracle database. i have a clob field in the databse for this purpose.
>> >i am unable to convert the string value to clob. anu clues would be
>> >thanx in advance.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center