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

resultset doubt  RSS feed

 
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


the above code gives me an error as shown:
"Invalid cursor state"

what is the default data type of results of an aggregate functions?!
 
Bartender
Posts: 2633
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should call .... rs.next() ....
 
Janardan Kelkar
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you....how could i do that!!
 
author & internet detective
Marshal
Posts: 37714
579
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Janardan Kelkar:
thank you....how could i do that!!





Note that normally you would have rs.next() is a while loop. count() is a special function that is guaranteed to always return one row (and one column) even if no rows match.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!