struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: [OT] Empty Result Set
Date Wed, 25 Jun 2003 17:34:44 GMT
boolean isEmpty = !rs.next();

David

--- "Kamholz, Keith   (corp-staff) USX" <kkamholz@moog.com> wrote:
> Hey everyone,
> This isn't really a struts question, but it's applicable.  I'm just
> wondering how to find out if a ResultSet is empty or not after I execute
> my
> query.  I've searched online, but I'm having a hard time finding much of
> anything.
> Can I just use:
> 
> if (myResultSet.next() )
> {
> 	empty = false;
> }
> else
> {
> 	empty = true;
> }
> 
> 
> Would that work or would that not do what I'm looking for?
> Any help would be appreciated, thanks!
> 
> - Keith
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message