hi,
i'm trying to create a new clob to put into a db with
stmt.setClob(column,clobvar)
I'm using sqlserver2005 and jtds connector.
jtds have a class, clobImpl, that implements interface java.sql.Clob,
but its constructor is protected.
How i can create a new clob and then put it to dB?
i know that oracle have a method,
CLOB.createTemporary(conn, false, CLOB.DURATION_SESSION);
that permit to instanziate a new clob.
how i can do with jtds and sqlserver2005?
please help me
thanks to all that will help me
zyon
Daniel Dittmar - 08 Mar 2006 17:00 GMT
> hi,
> i'm trying to create a new clob to put into a db with
[quoted text clipped - 5 lines]
>
> How i can create a new clob and then put it to dB?
- use setString, setASCIIStream or setCharacterStream instead (I guess
the important part is getting the data into the database, not using setClob)
- or create your own Clob implementation (my guess: for inserting data
into the database, only the methods getAsciiStream, getCharacterStream,
getSubString and length would be used, so you could raise SQLException
for anything else. Or you raise SQLException for everything at first to
get an idea which methods are actually called).
Daniel