Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet Problem (ofer)

 
ofer misk
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ive built a jdbc helper and now i have a problem:
i have a servlet, from it im trying to fetch a result set, but i get an SQLException : resultSet is closed.
i open the connection before calling the helper, and closing it after i fetch.
in the helper everything is fine, but in the servlet i kent nothing (but the SQLException)...
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm thinking clearly, closing the Connection closes the ResultSet. You'll want to finish using the ResultSet before closing the Connection. Note that you could copy the data in the ResultSet to a different data structure. Peter den Haan posted a nifty utility to do just such a thing over in the Intermediate forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic