Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: writing CLOB data to Oracle 8 using CallableStatements
http://otn.oracle.com/tech/java/sqlj_jdbc/content.html
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html
AlexV
"Michael Lawless" <syadnasti_at_hotmail.com> wrote in message
news:94e3e03.0201210559.68febfdf_at_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 - 18:07:29 CST