James Lee wrote:

> I want to display a message when the ResultSet is empty from the database.
> But when I try to check ResultSet  by using the following methods like:
>   if ( rset == null ) {
>      //  display the message
>   } else {
>      //  display the results
>   }
> it seems not working.  I also tried to use
>   if ( !rset.next() )    and  if (!rset.first())  but none of them seems
> work.
>
> I am using Weblogic JDBC2.0 connection pool.  It works fine if I do not
> check the ResultSet and just display them.  Only thing is I got a blank page
> if no results.
>
> Any suggestions?

Try to do this in a TRY statement with the following CATCH statement :
    catch (SQLException e)
    {
       out.println(e.getMessage());
       while ((e = e.getNextException()) != null)
           out.println(e.getMessage());
    }

--
Gilles Broche
06 84 28 33 48

___________________________________________________________________________
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

Reply via email to