All,
I am trying to execute a simple DB2 stored procedue. Below is the snippet of the code:
CallableStatement cs3 = con.prepareCall("CALL my_proc5(?, ?)");
System.out.println(cs3.getClass());
cs3.setInt("n1", 3);
cs3.registerOutParameter(2, Types.CHAR);
cs3.execute();
String c2 = cs3.getString(2);
System.out.println("c2: " + c2);
cs3.close();
It keeps complainin the setInt is not supported. This is the error message I get:
Exception in thread "main" com.ibm.db2.jcc.a.SqlException: [jcc][10183][10229][4.0.100] JDBC 3 method called: Method is not yet supported. ERRORCODE=-4450, SQLSTATE=null
I am running using db2jcc4.jar, which according to the docs should support setInt for CallableStatement. The exact driver version (from DatabaseMetaData() is:4.0.100
I have also tried using setObject, but no luck with that. Also when establishing connection, I set the following:
props.put("DB2_USE_DB2JCCT2_JROUTINE", "TRUE");
props.put("driverType", "4");
Still no luck. What am I missing here?
Thanks in advance.