Guest.Visitor
01-01-1995, 02:00 AM
Hi, I am trying to call a stored procedure from the 400 with a Java program. I am able to connect, and able to find the stored procedure. When I try to set the values of the parameters, and try to execute the query with the executeQuery() method I get a "Cursor State Not Valid" error message. I am not really sure what this means. I am passing the correct data types to the parameters. I have included part of the code below. If anyone knows what is causing this error message, I would really appreciate hearing from you. setCallableStmt(getConnect().prepareCall("CALL ROBERT.ID_NAME_LS(?, ?, ?, ?, ?)")); ResultSet rs = null; getCallableStmt().setInt(1, 1); getCallableStmt().setInt(2, 10); getCallableStmt().setString(3, getIDNumber()); getCallableStmt().setString(4, getName()); getCallableStmt().setInt(5, getSeqNum()); rs = getCallableStmt().executeQuery(); while (rs.next()) Thanks for your time and help, Amie