Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: writing CLOB data to Oracle 8 using CallableStatements

Re: writing CLOB data to Oracle 8 using CallableStatements

From: Michael Lawless <syadnasti_at_hotmail.com>
Date: 21 Jan 2002 05:59:42 -0800
Message-ID: <94e3e03.0201210559.68febfdf@posting.google.com>


Java Developer wrote:

 There is no such thins as setClob () or setBlob (). You must use  setCharacterStream () or something similar [I do not have my docs in  front of me right now].

Thanks, but I understand that you need some Writer as I have been trying this:

       	oracle.jdbc.driver.OracleConnection oralConn                  
         =oracle.jdbc.driver.OracleConnection)myConn;
       	
        oracle.sql.CLOB clob2 = new oracle.sql.CLOB(oralConn);
	java.io.Writer writer;


// read data into a character array
char[] data = {'0','1','2','3','4','5','6','7','8','9'};
// write the array of character data to a CLOB
writer = (clob2).getCharacterOutputStream(); writer.write(data); writer.flush(); writer.close(); call.setClob(4,clob2 ); call.execute();

But I am get a NullPointerException

Any ideas anyone. I have been looking at the Oracle website, but still there is no hint that i can find on using CallableStatements Received on Mon Jan 21 2002 - 07:59:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US