File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLException problem?

 
Sam Doder
Ranch Hand
Posts: 204
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting this exception from the lines below

java.sql.SQLException: Operation not allowed after ResultSet closed



Basically I have to get data out of many different tables so I have to execute about 6 different sql statments. What I want to know is how I can execute these statements and get their results without haveing to close the database connection and the resultset each query.

Why is this happening what is the best/easiest way to remedy this.

Thanks again.

Ahhhhhhhh
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,
That looks like the same prepared statement 6 times. How are you changing the query each time?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic