This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can`t get info out of a Oracle db with java  RSS feed

 
Serban Cameron
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I connected a Java to a Oracle XE all fine but when I try to get some info out it gives me this: Exhausted Resultset . How can I make it work ? Thanks
Here is the code:
 
Junilu Lacar
Sheriff
Posts: 10929
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ResultSet.next() returns false if there is no record to read. You have to put your rs.getXXX() calls inside an if-statement that checks the result of next()--do it only if there is a valid record to read from.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!