This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why Resultset's next is giving false

 
Huzefa Zohaib
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything in my program is ok except rsa.next().
I am not getting that rsa.next() is giving false
although my HyperSonic database contains three colunms and two data entries.

while(rsa.next()) {
String nm= rsa.getString ("name");
out.println (nm);
}
Please guide me what could be the problem in your suggestions.
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's your query order?
 
Kunal Aher
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please try running the query from the tool to test if the query really returns something !
Secondly , if possible try to use cachedrowsets , the reference implementation is available on the sun site. Advantage is that u get to know the size of the fetched results ( which is so desperately required sometimes )
Cheers
Kunal
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved from Servlets -> JDBC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic