Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resultset

 
anu manju
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to find out the end of resultset without using next() method.
may i open resultset within while loop another resultset.
 
Sarthishari Kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Did u try resultset.isLast().
This will return a TRUE Boolean value if the Resultset has reached the last Record.
Hope this helps
Sathish
 
Chris Smith
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anu,
To answer the second part of your question, if you use executeQuery again on the *same* statement, it will close the previous ResultSet. So no, you can't use another ResultSet from the SAME STATEMENT in a loop over a prior ResultSet. However, there's nothing preventing you from using multiple statements within a connection.
I'm wondering what this has to do with Servlets. Perhaps it would be better continued in a different category?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup.. moving from Servlets -> JDBC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic