i am developing a web application using tomcat and mysql.  the requirements
of the current functionality on which i am working are such that i need to
run a query against a table, and then as i am looping through the ResultSet
from that query, i need to be able to execute additional queries and process
those ResultSets.  the basic structure is as follows.

ResultSet rset = (ResultSet) blah;
while (rset.next()) {
NEED TO RUN ANOTHER DATABASE CONNECTION HERE!
}

of course, since i have one connection open, i can't nest another open
connection without throwing a compilation error.  i have thought about
trying to store the results of the first query into an array and then
working through that array, but it seems rather rudimentary.  i would think
that tomcat (and jsp engines in general) would have some type of container
or some means for assigning the ResultSet to some page context or something
to address this need.  for those of you that have also used Cold Fusion,
it's a very simple task there as the query results are assigned to an object
available in that page, and you can loop through that object any time later
basically doing what you want with the results.  what are some solutions you
have used to address this need?  fyi, a group by in the sql isn't going to
be sufficient...

thanks in advance.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to