I get an exception in the first line below the code
java.lang.ClassCastException: oracle.jdbc.internal.OracleConnection $$ EnhancerByProxool $$ 3415e85 cannot be passed to oracle.jdbc.driver.OracleConnection
How to convert string to oracle.sql.Clob
and how to paste using PreparedStatement
.
// con is java.sql.Connection object oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(con, false, oracle.sql.CLOB.DURATION_SESSION); newClob.putString(1,transcript); pstmt.setClob(1, newClob); pstmt.setString(2, StringUtils.dateToMillis(endTime)); pstmt.setString(3, sessionID); int count = pstmt.executeUpdate(); System.out.println("updated count ::"+count); System.out.println("transcript updated....");
source share