SQLException: This ResultSet is closed

后端 未结 1 1010
傲寒
傲寒 2021-01-16 12:04

I am trying to compare values from three Resultset, but there seems to exception wen I try to run it. Could someone help me on where am going wrong. I will app

相关标签:
1条回答
  • 2021-01-16 12:43
    java.sql.ResultSet rset = pstmt.executeQuery("SELECT DISTINCT payment_mode, transaction_type, credit FROM ac_cash_collection WHERE shift_no = '" + shiftNumber + "'");
    java.sql.ResultSet rset2 = pstmt.executeQuery("select debit from ac_cash_book where shift_no='"+shiftNumber+"'");
    

    Your second call releases the resources generated by the first one, that's why the ResultSet is closed.

    0 讨论(0)
提交回复
热议问题