I am trying to call a stored procedure from my java code and I am getting an sql exception. here is my code snippet
CallableStatement cstmt = conn.prepareCall("{call stroredprocname(?,?,?)}");
cstmt.setString(1, filePattern);
cstmt.setString(2, fromDate);
cstmt.setString(3, toDate);
ResultSet resultSet = cstmt.executeQuery();
this is the error code i am getting:
com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: stroredprocname;PROCEDURE
at com.ibm.db2.jcc.c.tf.e(tf.java:1680)
at com.ibm.db2.jcc.c.tf.a(tf.java:1239)
at com.ibm.db2.jcc.b.jb.h(jb.java:139)
at com.ibm.db2.jcc.b.jb.d(jb.java:71)
at com.ibm.db2.jcc.b.w.d(w.java:54)
at com.ibm.db2.jcc.b.cc.i(cc.java:208)
at com.ibm.db2.jcc.c.tf.o(tf.java:1236)
at com.ibm.db2.jcc.c.uf.ib(uf.java:1831)
at com.ibm.db2.jcc.c.uf.d(uf.java:2296)
at com.ibm.db2.jcc.c.vf.Z(vf.java:159)
at com.ibm.db2.jcc.c.vf.execute(vf.java:142)
at MyClass(MyClass.java:102)
Could some please help me out! Thanks in advance!