ResultSet has an open connection to the database, and until you call
ResultSet.close() method or GarbageCollector collects it, it will stay open,
so you shoud copy everything into a collection, close the result set and
then put the collection on the session for JSP to access.
----- Original Message -----
From: "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 1:46 PM
Subject: RE: Collection for ResultSet


> I just learned how to do this sort of database work yesterday.  Obviously
> I'm no expert, but it seems like you should just do exactly what you
> thought.  A ResultSet is generally not scrollable, so you should probably
> put the retrieved info in a collection.  Any of those database experts out
> there should correct me if I'm wrong.
>
> ~ Keith
>
>
> -----Original Message-----
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 26, 2002 1:40 PM
> To: [EMAIL PROTECTED]
> Subject: Collection for ResultSet
>
>
> Subject: Collection for ResultSet
> From: "David Chu" <[EMAIL PROTECTED]>
>  ===
> What is the preferred method to iterate through the rows of a database
query
> from a JSP under the Struts framework?  Should I write a class that dumps
> the contents of a ResultSet into some Collection?  It seems this is a
> reoccuring problem and would have been tackled before.  Please advise on a
> preferred solution.  Thanks.
>
>
> --
> -david
>
> ------------------------------
> David C. Chu
> America Online
> Network Tools Intern
> ------------------------------
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to