Category Archives: JDBC

java.sql.SQLException: ORA-03115: unsupported network datatype or representation

java.sql.SQLException: ORA-03115: unsupported network datatype or representation I was getting the above exception when I was trying to set a CLOB data in the database using java. More understanding about this exception can be get from http://www.coderanch.com/t/302117/JDBC/java/java-sql-SQLException-ORA-unsupported The mistake I … Continue reading

Posted in JDBC, Oracle | Leave a comment

Common pitfalls in JDBC Prepared Statement

DO NOT USE single quotes when using setString method. Usually we tend to forget this when using like statement as in select projectId from t_project where projectName like ?// Setting the value// The following is incorrect and will not workpstmt.setString(1,”‘%abc%'”);// … Continue reading

Posted in JDBC | Leave a comment

Best practices in JDBC Connection

JDBC Connection Scope How should your application manage the life cycle of JDBC connections? Asked another way, this question really asks – what is the scope of the JDBC connection object within your application? Let’s consider a servlet that performs … Continue reading

Posted in JDBC | Leave a comment