Well, this really isn't a JSP response, but I find that I am much happier
converting from an SQL/RDBMS model of the problem to an OO model of the
problem as soon as possible in an application.  That is, define an object
that you are displaying in every row on your page, with get/set methods.  In
your JDBC code (which should probably be in a bean), retrieve the rows from
your table, and convert each row to an object, and add the object to a
collection of objects.  You can then use the sorting functions of the
collection classes to manipulate the order of objects depending on what your
users choose.

Of course, this solution has the same limitation as CachedRowSet: it won't
work for large result sets.

HTH

----- Original Message -----
From: Jyoti Bongarala <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 19, 2000 9:16 AM
Subject: (Very very urgent)Sorting a resultset after closing the connection


> HI all,
>
> My problem is I am looking for an algorithm or a
> program that would do the following :
>
> 1. Once I retrieve a resultset from the database, I
> store it in a CachedRowSet. And when I display it ,
> the user should be able to sort the data by any column
> (total columns retrieved are 13) and this sorting has
> to be done (outside the database)
>
> Please somebody help me with this or give me a
> lead....
>
> thanks,
> Jyoti
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to