OUT « stored procedure « Java Database Q&A





3. stored procedure: Parameter index out of range    coderanch.com

I call stored proc, but I got a parameter index error. Anybody has some ideas ? Thanks. Vector params = new Vector(); params.add(new SqlOutParameter("statusCode", Types.INTEGER)); params.add(new SqlParameter("id", Types.INTEGER)); params.add(new SqlOutParameter("num", Types.INTEGER)); params.add(new SqlParameter("prin", Types.DOUBLE)); params.add(new SqlParameter("notional", Types.CHAR)); params.add(new SqlParameter("src", Types.VARCHAR)); params.add(new SqlParameter("pgm", Types.VARCHAR)); try { Map retMap = jt.call(new CallableStatementCreator() { public CallableStatement createCallableStatement(Connection con) throws SQLException { CallableStatement cs = ...