Yes, you can provided you are using JDK1.2. Use a scrollable ResultSet and
execute its method last() and first() to move to last and first row of your
ResultSet. When pointing to the last row, call ResultSet's getRow() method
to get the number of row you are pointing.

regards
Y

----- Original Message -----
From: Paras Sharma <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 11, 2000 8:24 PM
Subject: howto get Number of rows


> hi
>
>   can  some tell me  when we access database how to get the  number of
rows
> in   table   like the sql statement is
>
> select * from  tablename;
>
> can i know how many   rows r there   (without moving all the rows )
>
> or   if i use  select count(*) from table   in the excutequery()  then
> what will be return
>
> or   can  we  get  the  no. of rows effected when i use "select..."
statement
> in excuteUpdate() function
>
>
> thanx in adcance
>
> paras
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to