This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC ResultSet is closed on a constantly running application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC ResultSet is closed on a constantly running application" Watch "JDBC ResultSet is closed on a constantly running application" New topic
Author

JDBC ResultSet is closed on a constantly running application

Joe Meany
Greenhorn

Joined: Jun 14, 2011
Posts: 25
Hey guys,

I am (hopefully) finishing up an application that uses JDBC for the first time. Now, everything works great except when i want to update a graphically displayed table of the database information i am receiving(and adding and deleting). The adding and deleting is currently working great, as is the querying, and everything is writing to the database great. However, i am often getting a result set is closed exception when i try to update to frequently.

Essentially what happens is a user comes to the application, adds a date and an explanation for why theyll be gone, and adds it to the database. The end of this operation prompts the gui to update the table to accuratly display the data. However, when this happens in great succession, the application errors out.

I understand what this error means, but i cannot tell where it is coming from...it may be when the previous resultset hits its end, and then when another add or delete happens, it errors out.

I suppose this is pretty vague, but im trying to be descript. Every time a button is pressed on the gui to add or delete an entry, the ad method in java is called, which then in turn calls the update method. If some more additions were to be made, thats when the application errors out, it doesnt happen after every change.

Thats why I'm a little lost at how to go about finding what is happening.
And thanks in advance, im pretty new here but you all have been extremely helpful(even with my lackluster descriptions)
Joe Meany
Greenhorn

Joined: Jun 14, 2011
Posts: 25
I retract my previous post. My problem was...me copying/pasting. My apologies
 
GeeCON Prague 2014
 
subject: JDBC ResultSet is closed on a constantly running application