my dog learned polymorphism*
The moose likes JDBC and the fly likes resultset doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "resultset doubt" Watch "resultset doubt" New topic

resultset doubt

Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 72

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

what is the default data type of results of an aggregate functions?!

When the compiler's not happy, ain't nobody happy.
Jan Cumps

Joined: Dec 20, 2006
Posts: 2491

you should call .... ....

OCUP UML fundamental and ITIL foundation
youtube channel
Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 72

thank could i do that!!
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30085

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

Note that normally you would have 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.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Consider Paul's rocket mass heater.
subject: resultset doubt
Similar Threads
the Exclusive OR operator
Please explain the output of this: This question is from ExamLabs Diagnostic Test
doubt about '?' symbol
JavaScript Newbie Simple Problem
Regular expression for valid xml