This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Record Set closing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Record Set closing" Watch "Record Set closing" New topic
Author

Record Set closing

Tom Enders
Greenhorn

Joined: Mar 27, 2010
Posts: 4
Why is my record set closed when I try to read from it the line after I execute the sql statement?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26138
    
  66

Tom,
Can you show the relevant code snippet?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tom Enders
Greenhorn

Joined: Mar 27, 2010
Posts: 4
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5528

What database and JDBC driver are you using?

If you comment out the ifClosed() check, what happens? Could it be that your query returns no results?


JBoss In Action
Tom Enders
Greenhorn

Joined: Mar 27, 2010
Posts: 4
It's working now. The problem was with my inserts. They were not executing because I had some bad boolean logic surrounding them. So, the problem wasn't actually with this piece of code.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Record Set closing
 
Similar Threads
primeval
URLyBird DB Null Terminated Values
SQL query????
FTP upload
fetch data at a given record