Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resultset is closed

 
jayram
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
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
TIA
Cheers
Jayram
 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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
ravee.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic