This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Resultset is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Resultset is closed" Watch "Resultset is closed" New topic

Resultset is closed

Ranch Hand

Joined: Oct 30, 2000
Posts: 94
I am having a problem while using JDBC
I have a servlet which uses a DBConnection class
The servlet calls getResultSet(String qryString) method if DBConnection class. The getResultSet returns a reference to the resultset.
Inside DBConnection class i do normal jdbc stuff like create a connection,statment executer a query and return the resultset.
Now when i try to do anything with this resultset in my servlet i get a SQLException "resultset is already closed". The resultset object is still there
Please help me on this problem
Ravee Bhat
Ranch Hand

Joined: Nov 26, 1999
Posts: 72

You must be cloing the Database connection somewhere.Do check where are you doing this. Though you have a ref to the DBConnection class (you custom connection class) check if you have closed the connection with the database.
thanks and regards
I agree. Here's the link:
subject: Resultset is closed
Similar Threads
Releasing objects on multiple requests
reusing the Statement object
Statement Closed Error - please help
First Servlet, Jdbc program :(
scriptlet method to return resultSet help