• Post Reply Bookmark Topic Watch Topic
  • New Topic

SQLException problem?  RSS feed

 
Sam Doder
Ranch Hand
Posts: 204
  • 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
Sheriff
Posts: 36441
454
Eclipse IDE Java VI Editor
  • 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
Boost this thread!