How can I avoid ResultSet is closed exception in Java?

前端 未结 10 1003
渐次进展
渐次进展 2020-11-28 09:51

As soon as my code gets to my while(rs.next()) loop it produces the ResultSet is closed exception. What causes this exception and how can I correct

10条回答
  •  时光取名叫无心
    2020-11-28 10:22

    Sounds like you executed another statement in the same connection before traversing the result set from the first statement. If you're nesting the processing of two result sets from the same database, you're doing something wrong. The combination of those sets should be done on the database side.

提交回复
热议问题