HI,
You can Do this as:----
ResultSet rs=null;
// here is your query and other syntax of Java with Jdbc
rs.afterLast();
rs.previous();
int nor = rs.getRow();
out.println("No. of rows"+nor);
// other code line
Now this 'nor' gives you the Total Number of Rows which your query returns.
But for this you need a Type-4 JDBC Driver.
I hope that it'll helpful for u
PRanav
----- Original Message -----
From: Medha Rangnekar <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 30, 2000 5:07 AM
Subject: any function in java.sql to give no of rows?
> I need to know the total no of rows a query returns in my JSP application.
I
> am new to JSP. I know that in ColdFusion there is such function like
> queryname.recordcount
> I looked on sun site for Resultset methods and also for resultSetMetaData
> methods. I did not find one. I found one GetFetchSize but seems like it
> gives the buffer size.
> Any help is appreciated.
>
> Thanks,
> Medha
>
>
===========================================================================
> 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