• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resultset doubt

 
Janardan Kelkar
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?!
 
Jan Cumps
Bartender
Posts: 2608
14
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!!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
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