Normally in SQL you don't know the number of rows until you collect them.
If you actually need to know before hand, issue the "SELECT COUNT(*) WHERE
..." call, you'll get a result set with one integer result that is the
number of rows that a select with the same where clause will return.
(*Chris*)
----- Original Message -----
From: Java List <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 10, 1999 7:31 PM
Subject: JDBC Question
> I've got a servlet that's succesfully connecting to a SQL database
> (mySQL). I'm able to put data into and get data out of the database with
> no probelms. I'm interesting in getting the numbers of records found in a
> ResultSet object. Anyone know of a method in the java.sql.ResultSet()
> class or the java.sql.Statement() class (or any other class) that will
> return the number of found records in a ResultSet Object.
>
> -Nash
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html