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 -> CLOB fields

CLOB fields

From: Frederik Hansen <roirex_at_post1.tele.dk>
Date: Wed, 22 Sep 1999 16:14:52 +0200
Message-ID: <37E8E45C.C4977B7B@post1.tele.dk>


Hi

How can I write a CLOB to the database? Or more needed how can I get a CLOB object to where I can write my data. I have done this:

        byte[] bytes = { '1','2' };

	java.io.OutputStream out;
	oracle.sql.CLOB cl;

	if (bytes.length == 0)
	{
		// **********
		cl = new oracle.sql.CLOB((oracle.jdbc.driver.OracleConnection)conn);
		// ********** ^ This is my problem...

		out = cl.getAsciiOutputStream();
		try

{
out.write(bytes); out.flush(); out.close(); } catch (IOException e)
{
e.printStackTrace(); throw new SQLCORBAException(0, "Error writing CLOB socket"); } psta.setClob(1, cl); } else psta.setNull(1, java.sql.Types.CLOB);

Any one know who to do this??

Frederik Hansen Received on Wed Sep 22 1999 - 09:14:52 CDT

Original text of this message

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