在下面的代码中,方法 resultset.next() 返回 false
String sql = "{?= call fun_consolidate_retrieve_vector_receipt_payment_details(?,?,?,?,?,?)}";
callableStatement = con.prepareCall(sql);
callableStatement = con.prepareCall(" {? = call fun_retrieve_vector_receipt_payment_details(?,?,?,?,?,?)}");
callableStatement.registerOutParameter(1, Types.OTHER);
callableStatement.setString(2, "PAYMENT");
callableStatement.setInt(3, 47);
callableStatement.setString(4, "24-05-2013");
callableStatement.setString(5, "24-09-2013");
callableStatement.setString(6, "Y");
callableStatement.setObject(7, resultSet);
con.setAutoCommit(false);
callableStatement.execute();
resultSet = (ResultSet) callableStatement.getObject(1);
boolean next = resultSet.next();
为什么会这样???如果我从我的数据库中调用相同的存储过程,它会产生 2 行输出(提供与 java 代码中相同的输入)