09/05/2000 10:30 AM
(subscript: Martin De Miguel Lillo@TSM)
Hi All
I think there is a alternative solution, you can test with next(): if t=
here is
any row in the resultSet returns true and moves the cursor at first row=
. If
there isn't any row returns false.
Mart=EDn
05/09/2000 01:56 AM
Kevin Jones <[EMAIL PROTECTED]>
Por favor, responda a "A mailing list for discussion about Sun Microsys=
tem's
Java Servlet API Technology." <SERVLET-INTEREST@java=
.sun.com>
Destinatarios: [EMAIL PROTECTED]
CC: (cci: Martin De Miguel Lillo/UN19159/DESARROLLO DE SISTEMAS/=
TSM)
Asunto: Re: checking Empty-ResultSet
=
--0__=kLGxITxCIf5fV4HnAf6mN4rTLYDb9cKujUE6nS9JRUQGFkj8rhVpYt2C
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
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