Maybe you could say :
if (rs.next())
{ ... whatever you are doing...
}
[EMAIL PROTECTED] wrote:
> Servlet API Technology." <[EMAIL PROTECTED]>
> From: Kevin Jones <[EMAIL PROTECTED]>
> Subject: Re: checking Empty-ResultSet
> To: [EMAIL PROTECTED]
> In-Reply-To: <362F53359047D411887C0008C7C986C58A5184@BETCLT03>
>
> You could always do a "SELECT COUNT (*)" SQL query first, this will tell you
> how many rows you will get back then run the 'real' query if the answer is >
> 0
>
> Kevin Jones
> DevelopMentor
> www.develop.com
>
> > -----Original Message-----
> > From: A mailing list for discussion about Sun Microsystem's Java Servlet
> > API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Rajesh_Singh
> > Sent: 29 August 2000 12:29
> > To: [EMAIL PROTECTED]
> > 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
___________________________________________________________________________
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