On 21.Aug.2002 -- 11:59 AM, Carlo Pescetelli wrote:
> I've problem inserting a CLOB object in a Oracle DB.
CLOBs is a difficult and complex application. Try the DatabaseActions,
they support CLOBs to some extent.
> The problem arises when I try to insert this data as a CLOB using:
>
> insert into MY_TB
> values
> ( ...
> , <xsp:expr>(CLOB)texts.elementAt(i)</xsp:expr>
> , ...)
Try a prepared statement (you'll get one if you use
esql:parameter). If you do all the CLOB stuff manually (i.e. create an
instance conforming to java.sql.Clob), you can set it alright.
You could use the setCharacterStream method as well -- and provide a
Reader object. esql currently doesn't allow to set the length so you'd
need to fiddle with the esql.xsl for that a bit.
> I miss something?
No.
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>