You can do like this:
if (!rset.next() ) {
// Do something tells your user no result found from the query
}
else
do {
// Show you results to your user
} while (rset.next());
}
Hope this helps.
James
----- Original Message -----
From: Rajesh_Singh <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 29, 2000 7:28 AM
Subject: checking Empty-ResultSet
> Hi friends
> i'm sorry but this question i'm repeating
> here after a long time as i'm finding it difficult
> to solve...How to Check whether ResultSet is
> empty..?...as if it is empty then on executing the
> statement resultset.next()...it throws an execption..so how
> to check it....
> Please let me know if any of u have any suggestion....
> will appreciate ur response..
>
> thanx
> Rajesh
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html