Amar try this

ResultSet rs=stmt.executeQuery("select count(*) from tablename");
rs.next();
int x=rs.getInt(1);
out.println(x);

Now this x will show thw no of records

or u can use

ResultSet rs=stmt.executeQuery("select * from tablename");
int x=0;
while(rs.next()){
x++;
}
out.println(x);

This will also show the no of records



-----Original Message-----
From: amar singhal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 23, 2000 5:09 AM
To: [EMAIL PROTECTED]
Subject: JDBC: want to know the no of record fetch my any select query


Hi,
I am using jdbc 1.1 driver. I want to know the records fetch by any
select
query statment.

thanks.
Amar Singhal


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

========================================================================
===
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