Ron,
You are right, ADO has built in sorting mechanism.
But ADO built in sorting doesn't work with "connectionless recordset", I guess.
Donno why ?????
In my case i was getting the data from LDAP server, not from the DB, using ADSI
in the form of RS, which i wanted to sort before returing it from the
component. And the built in sorting was not working on "that" RS. Also i had to
sort on Multiple columns. So i had to sort it manually, using array.
Shahaji.
-----Original Message-----
From: Ron.Quartel [SMTP:[EMAIL PROTECTED]]
Sent: May 08, 2001 6:24 PM
To: JSP-INTEREST
Cc: Ron.Quartel
Subject: Re: Sorting table columns
Why not use the TreeSet or TreeMap structures that do the sorting for you?
ADO has this functionality built in (rs.sort = "columnName"). No need for
arrays etc.
Ron Quartel
-----Original Message-----
From: Shahaji Kadam. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 5:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Sorting table columns
Hi Sai,
if you don't want to use ORDER BY then you have to go for some other data
structure... like Hash Table, vector, or array.
But if you want to use SORTED recordset instead (without ORDER BY) then try
this -- take sorting column values (after the unsorted resultset is
returned)
in Array and sort the array --------then according to sorted array "Build"
the
recordset object again (same or new recordset) .... use it.
I had done this in ASP using ADO ..... but not tried in JSP (or Java) ......
donno if it is possible here.......if not then you have to go for array like
solution.
good luck.
Shahaji.Kadam
-----Original Message-----
From: Sairam.Kuppuswamy [SMTP:[EMAIL PROTECTED]]
Sent: May 07, 2001 10:56 PM
To: JSP-INTEREST
Cc: Sairam.Kuppuswamy
Subject: Re: Sorting table columns
Importance: High
I too am facing a similar problem, but the difference is I need to Sort the
column only with the fetched data set (The SQL Order By could not be used).
With this case I thought of
using an Hash Array for the fetched Data Set and then, on the User-Clicked
column (which would be a particular index of the Array), the Sort routine
should be working.
I am still working on it, but in vain.
If somebody has a better solution or the same solution, please extend your
help
for this Sort functionality.
thanks in-advance.
Sai
mailto:[EMAIL PROTECTED]
-----Original Message-----
From: Paul Meshkovsky [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 1:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Sorting table columns
It is probably resolved but I just want do add
<th> <a href=yourjsp.jsp?filed=COLUMN_NAME1>COLUMN NAME</a></th>
you just have to add in your sql an order or group by clause where value of
filed will go
Paul.
> -----Original Message-----
> From: Zeltser, Mark [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 03, 2001 3:17 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Sorting table columns
>
> One approach is to let database handle the sorting. You can pass a
parameter
> (each column will represent different parameter) to store procedure which
> will return you new table sorted by specified column.
>
> Mark.
>
>
>
> > -----Original Message-----
> > From: Schulz Ryan C [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, May 03, 2001 3:00 PM
> > To: [EMAIL PROTECTED]
> > Subject: Sorting table columns
> >
> > Has anyone had any experience using a servlet to sort table columns?
I'm
> > filling a table dynamically and I want to sort the results by columns
with
> > the column headers being links that will sort the data in that
particular
> > column.
> >
> > I would appreciate any feedback on this.
> >
> >
==========================================================================
> > =
> > 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
>
>
>
----------------------------------------------------------------------------
--
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above. If you are not the intended
recipient of
> this message you are hereby notified that any review, dissemination,
> distribution or copying of this message is strictly prohibited. This
> communication is for information purposes only and should not be regarded
as
> an offer to sell or as a solicitation of an offer to buy any financial
> product, an official confirmation of any transaction, or as an official
> statement of Lehman Brothers Inc. Email transmission cannot be guaranteed
to
> be secure or error-free. Therefore, we do not represent that this
information
> is complete or accurate and it should not be relied upon as such. All
> information is subject to change without notice.
>
>
===========================================================================
> 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
===========================================================================
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
===========================================================================
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