为什么我得到ResultSet是闭合的错误,当我从来没有关闭任何 [英] Why am I getting ResultSet is closed error when I never closed any
问题描述
我在我的代码中有这个错误,并检查和编辑它彻底,但我仍然得到同样的问题。我也使用多个resultSet和语句,但同样的错误发生。下面是我得到的错误:
I have this error in my code and have checked and edited it thoroughly, yet I still get same issue. I also use multiple resultSet and Statements yet same error occurs. Below is the error I get:
"Database Connected with Current Date 20130221
java.sql.SQLException: ResultSet is closed
at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.next(Unknown Source)
at UNSUB.main(UNSUB.java:78)"
Press any key to continue . . .
请问可能是什么原因?我现在不知道任何解决方案。
Please What could be the reason? I have no idea on any solution now.
推荐答案
异常 java.sql.SQLException:ResultSet已关闭
表示您的代码已关闭您正在使用的结果集对象
,或更可能的是您的代码已重新执行或关闭语句
产生结果集。根据JDBC规范,这些操作将从语句中关闭任何
结果集。
The exception, java.sql.SQLException: ResultSet is closed
means that your code has either already closed the result set object
you're using, or more likely, that your code has either re-executed or closed the statement that
produced the result set. By JDBC specs, either of those actions will close any
result set from the statement.
这篇关于为什么我得到ResultSet是闭合的错误,当我从来没有关闭任何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!