Hello Rajesh,
Saturday, August 26, 2000, 4:56:17 PM, you wrote:
RS> can anyone of u please tell me how
RS> to check whether ResultSet is empty
RS> ,before retrieving record from
RS> that...
RS> is there any method given by JDBC2.0 version?
RS> or any other suggestion?
With first call to method ResultSet.next() you can test for
avalability of data in resultset. First call points cursor to the
first row only and returns true if it action successful and false in
another case. For example:
private ResultSet rs = statement.executeQuery();
if( rs.next() ) {
.. place you code to process results here
} else {
System.out.println("nothing");
}
--
Best regards,
Oleg mailto:[EMAIL PROTECTED]
===========================================================================
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