Skip to Content
0
Former Member
Nov 16, 2005 at 11:35 AM

problem with java.sql.Clob and oracle.sql.CLOB

100 Views

Hi,

I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below

java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);

lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));

lResourceStatus = true;

can anybody please tell me the what is the problem with this and solution.

thanks,

Ashok.