File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to re-sort the HTML table without requery the database? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to re-sort the HTML table without requery the database?" Watch "How to re-sort the HTML table without requery the database?" New topic
Author

How to re-sort the HTML table without requery the database?

fan mo
Ranch Hand

Joined: Mar 14, 2000
Posts: 36
Usual task:
user query the database ,get the resultset.
Results are showed in form of HTML table.
Now if user want to sort the table based on another field/column,
I have to query the database again.
Because it takes long time to query the database. I am wondering if there's a way so that I don't have to requery the database and just sort the resultset?
I think it's a very common situation java developer will face.
Thanks in advance.
Craig Snowbarger
Ranch Hand

Joined: Mar 07, 2001
Posts: 38
Have you tried using a cachedRowset?
Vikas Lamba
Greenhorn

Joined: Mar 20, 2001
Posts: 4
We had a similar requirment and we sorted it out by storing the results in an array. To sort, we used the Java sorting functions as defined in JDK 1.2 Arrays class.
Hope this helps.

Vikas Lamba
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to re-sort the HTML table without requery the database?
 
Similar Threads
Result Set Sorting
Invalid Object Name
Problem With Sorting..
Creating an MDB from the resultset
How to create a history table for query executed.