aspose file tools*
The moose likes JDBC and the fly likes Cannot view data in pop-up window in ascending order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Cannot view data in pop-up window in ascending order" Watch "Cannot view data in pop-up window in ascending order" New topic
Author

Cannot view data in pop-up window in ascending order

Jyotsna Pai
Greenhorn

Joined: Aug 07, 2009
Posts: 18
Hi there,

I was looking for some help or advise on the following.
Any help is much appreciated.

I am trying to correct the sequencing of a pop-up window corrected so that they appear in the right sequence.
10 should come after 9, in fact the single digit Code should appear as 01 thru 09. Any help/advise is much appreciated

To display some data in a pop-up window in ascending order the SQL created
in a javascript. The SQL is named "SUPER".

The SQL retrieves the data as sorted in ascending order when run/unit-tested independently in the database.

However, the data is NOT seen in sorted ASCENDING order in the pop-up window on the client side.

The SQL is as follows -



Please note that the a.table_code is of char type and the data it returns is ranging from 1 - 10.
In order for the data to be displayed in ascending order on the client-side pop-up window, I modified the SQL as follows



This also independently returns me data in ascending order when run unit-tested in the database.

However as above, both these SQL's do not return the data in ascending order on the client-side when seen in the new pop-up window.

The code for the JSP that actually runs/invokes the SQL is as follows -


The code for the new pop-up window is as follows -


The JSP code used to display the pop-up is -



Any help or advise is much appreciated.

Thanks in advance!

Cheers,
Jyotsna Pai
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

(This isn't an app that anyone besides like developers can use, right?! Like not for the public?)
Jyotsna Pai
Greenhorn

Joined: Aug 07, 2009
Posts: 18
Yes, it is not for public.

Thanks and Regards,
Jyotsna Pai
Jyotsna Pai
Greenhorn

Joined: Aug 07, 2009
Posts: 18
Hello everyone,

Thanks to anyone who views the page.
I resolved the issue myself, by changing the code for the JSP that actually runs/invokes the SQL.
I used the Collections.sort() method, using a Comparator to sort Strings that held integers/numbers.

The code for the JSP that actually runs/invokes the SQL is as follows -


Rest all other code remains unchanged.

Thanks.

Best Regards,
Jyotsna Pai
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I don't even know where to begin, but glad you got it working. For your sake, I hope it never stops working, because tracking down problems in that code will be a nightmare.
 
wood burning stoves
 
subject: Cannot view data in pop-up window in ascending order