goto last row.
get the row number using getRow().
then come back to first row by saying .beforeFirst()

for this ur resultset has to be bidirectional.
take this care while creating the statement.


----- Original Message -----
From: "Vikram Kumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 09, 2000 4:56 PM
Subject: Re: Number of Records


> in JDBC2.0
>
> int count=0;
> while(rset.next()
> count++;
>
> Silvia Gaspar wrote:
>
> >         What function give us the number of records retrieved by a
query?
> > I'm using JDBC.
> >
> > Regards,
>
> --------------------------------------------------------------------------
--
> > -------------------------------
> > Compta - Equipamentos e Servi�os de inform�tica, S.A
> >
> > S�lvia Gaspar
> > Engenharia de Sistemas e Aplica��es
> > Implementa��o
> > Consultora  S�nior
> > *  TEL: +351.21. 350 14 00
> > *  Directo:     +351.21. 313 55 51
> > *    Fax:       +351.21.352 02 02
> > * e-mail:    [EMAIL PROTECTED]
> > * WWW:      www.compta.pt
> >
> >
___________________________________________________________________________
> > 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
>
> --
> Vikram Kumar
>
> Software Services International.
> Electronic City
> Gurgaon (Haryana)
>
> Phone : 91-6397534, 6346338, 6397533, 6397324
> Extension : 232
>
> "It is not what they take away from you that counts.
>  It's what you do with what you have left."
>
>         -Hubert Humphrey
>
>
___________________________________________________________________________
> 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

Reply via email to