File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes resultset doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 2565

you should call .... ....

OCUP UML fundamental and ITIL foundation
Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 72

thank could i do that!!
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33113

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: resultset doubt
It's not a secret anymore!