Hi,
that's amazing. My code is the following:
Clob tClob = createClob(conn);
tClob.truncate(0);
tClob.setString(1, (String) arg.getValue());
cStmt.setClob(i, tClob);
My code comes from simple "framework" that simplyfies calling of
stored procedures. It looks like the position within the Clob begins
at position 1 instead of zero.
(tClob is temporary CLOB and cStmt is CallableStatement)
You probably don't want to change your working code, but if you have
your previous proofs of concept, can you please try to use 1 instead
of 0 in the Clob.setString() call? I'm sure I definitely saw yours
"Invalid operation exceptions" during the development of my
"framework" :-/
Thank you very much!
Have a nice night
PETR
On Tue, Jul 1, 2008 at 19:38, <glassfish_at_javadesktop.org> wrote:
> Hi again
>
> I've already got the way to update the content of clob object.
>
> try {
> clob = createClob(cn);
> Writer wr = clob.setCharacterStream(0);
> wr.write(xml);
> wr.flush();
> wr.close();
> psUpd.setClob(2, clob);
> } catch (Exception gg) {
> gg.printStackTrace();
> }
>
> Best regards
> Aniceto Perez
> [Message sent by forum member 'aperezymadrid' (aperezymadrid)]
>
> http://forums.java.net/jive/thread.jspa?messageID=283729
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>