| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> CLOB fields
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
![]() |
![]() |