It Works . thanks Tim and Radu-Gabriel for your very good response.
----- Original Message -----
From: "Tim Yates" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 12:33 PM
Subject: Re: [JBoss-user] problem with oracle Clob column.
I know I have to do this (with JBoss 2.1...)
public static OracleResultSet getOracleResultSet( ResultSet r )
{
ResultSet rslt =
((org.jboss.minerva.jdbc.ResultSetInPool)r).getUnderlyingResultSet() ;
return ((OracleResultSet)rslt) ;
}
I know that :
org.jboss.minerva.jdbc.ResultSetInPool
has changed for sure...
but you should know what it is :-)
Good Luck,
Tim.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 10:49 AM
Subject: [JBoss-user] problem with oracle Clob column.
> hello jboss users.
> I want to write inside a Clob column in a oracle database. And I have
> problems with it. My code is this:
> -----------------------------------
> .
> .
> import oracle.sql.*;
> import oracle.jdbc.driver.*;
> .
> .
> con.setAutoCommit (false);
> Statement stmt = con.createStatement ();
> /*
> first,I insert into my table one record with only one blank space.
> */
> stmt.execute ("insert into mytable(mycol) values(' ')");
> /*
> second,I obtain my CLOB object and call fillClob, this is a method that
> write inside this object.
> */
> ResultSet rset = stmt.executeQuery ("select * from mytable for update");
> while (rset.next ())
> {
> CLOB clob = ((OracleResultSet)rset).getCLOB (1); /* #### this line
> cause the exception with pooling*/
> fillClob (con, clob, 6000);
> }
> rset.close();
> stmt.close();
> con.commit();
> con.setAutoCommit (true);
>
> ---------------------------------
>
> This is a modification of one example from
>
http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.81
> 7/a83724/samapp4.htm#1000956
> (if you wish to see it and need password. Membership is free )
>
> This code is working fine if I obtain the Connection without using
> minerval or jboss conection pooling . But if I obtain this
> Connection with this pooling(I tried it with jboss 2.2.2 and beta
2.4 ).
> I obtain the next exception in line above mark with '###'
>
> java.lang.ClassCastException:
> org.opentools.minerva.jdbc.ResultSetInPool
>
>
> �Can I work with this objects (CLOB) with pooling ?
> thaks for your help.
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user