Updating a clob field

The CLOB data type is similar to a BLOB, but includes character encoding, which defines a character set and the way each character is represented.BLOB data, on the other hand, consists of unformatted binary data.Common data types used for storing character data include char, varchar, and text.Some database management systems also support additional text data types such as tinytext, mediumtext, and longtext.If the standard character data types are not large enough for a certain database field, the CLOB data type may be used.

updating a clob field-12

When i am executing my procedure in linux machine it is giving me following error.

i initially followed the steps that rick would have used, but it wasnt working, and my updation was taking forrever and was going into a infinite loop. I have a string contents, and I am trying to update my contents CLOB field in my table, but when i set the clob Data = contents, it gives me a class exception. = null) rs.close(); prep Statement.close(); WRITTING DATA TO CLOB FIELD Connection connect = null; Prepared Statement prep Statement = null; Result Set rs = null; Result Set resultset = null; String add Itinerary Item Query = "INSERT INTO " Database Names. There was however another help, I would appreciate your help.


//RETRIEVING THE CLOB FROM ORACLE 8i Clob clob = Clob("XML"); Reader clob Stream = Character Stream(); String Buffer str Buffer = new String Buffer(); // Read from the Clob stream and write to the stringbuffer int nchars = 0; // Number of characters read char[] buffer = new char[10 * 1024]; // Buffer holding characters being transferred while( (nchars = clob Stream.read(buffer)) ! mglxxx, i got the code from rick working, what he posted in the very beginning.

= -1 ) String str XML = str String(); //WRITING THE CLOB TO ORACLE 8i Statement statement2 = connect.create Statement(); mglxxx i am trying to update a CLOB in my table, but somehow i am not getting any luck. CLOB DB2 CODE THAT I USED FOR CLOB READ/WRITE READING FROM A CLOB FIELD Connection connect = null; Prepared Statement prep Statement = null; Result Set rs = null; String str XML = ""; String get Items Query = "SELECT IT_XML " "FROM " Database Names. "; connect = get Connection(); prep Statement = connect.prepare Statement(g(); if (rs ! I am so glad that the code is working fine, and so is updation of the Clob field with more than 4000 characters.

Leave a Reply