tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Curwen" <gb_...@gb-im.com>
Subject RE: [OFF-TOPIC] RE: can resultset object be re-used
Date Wed, 01 Oct 2003 13:58:18 GMT
Well I just gotta say that's not true.  You *can* re-use a resultset
object. 

ResultSet rs = st.executeQuery("SELECT * FROM FOO");
//code that loops over rs and outputs results...
rs = st.executeQuery("SELECT * FROM BAR");
//a re-used ResultSet object.


> -----Original Message-----
> From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
> Sent: Wednesday, October 01, 2003 7:44 AM
> To: Tomcat Users List
> Subject: [OFF-TOPIC] RE: can resultset object be re-used
> 
> 
> 
> Howdy,
> First, this is off-topic and should be marked as such.
> 
> Second, the answer is no: you can't reuse them, it's one per 
> query.  In fact, since ResultSet is an interface, you don't 
> even have a constructor you can use (although you could 
> always try to reflect the implementation).
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-----Original Message-----
> >From: Paul [mailto:paul@msci.ca]
> >Sent: Tuesday, September 30, 2003 4:21 PM
> >To: Tomcat Users List
> >Subject: can resultset object be re-used
> >
> >jdbc question (tomcat 4.x, java 1.4.2, jdbc 3.0):
> >
> >can the ResultSet object be re-used to retrieve results from 
> altogether 
> >different sql query in same .jsp page?  Or does a new 
> ResultSet object
> need
> >to be created for each distinct sql query?
> >
> >-paul lomack.
> 
> 
> 
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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


Mime
View raw message