ResultSet has a last method.

last
public boolean last()
             throws SQLException
JDBC 2.0
Moves the cursor to the last row in the result set.

Returns:
true if the cursor is on a valid row; false if there are no rows in the
result set
Throws:
SQLException - if a database access error occurs or the result set type is
TYPE_FORWARD_ONLY.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Matthias M�ller
Sent: Tuesday, September 12, 2000 12:44 PM
To: [EMAIL PROTECTED]
Subject: Last entry in a resultSet


hi all,

i have a problem and maybe this is not the right mailing list, but i hope
anyone could help me with that problem.

I make a Database Query and my query Result is in my resultSet. How can i
get only the last entry of the resultSet.

Does anyone have an idea how can i solve that problem.

Thanks in advance


Matthias

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