cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: ESQL clob inserts
Date Wed, 21 Aug 2002 12:54:03 GMT
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
haul@informatik.tu-darmstadt.de
    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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message