DRW: Dynamic Sorting of Table w/ Search form

C

Costa, Frank

Hello,

I have a page that contains a Search form which queries a database, this
works great. But I would also like to add a sorting feature to the table.

Ex: When someone clicks on one of the Columns it will sort it either ASC or
DESC I've tried the examples that I've found here & the internet. I can
get the sorting to work, but my search Form disapears. and I can no longer
query/filter the database.

It's like (either one or the other) I can't get both of them to work (
Search form & Sorting on the results table)

Any ideas anyone.

Using: FrontPage 2002
Database: MS Access

Thanks
Frank
 
H

Harikumar H [MSFT]

Hi Costa,

Please use the steps explained below for creating a database results page
and sort it using some fields dynamically.

How-To Create a Database Results page based on the value from a drop down
list and
sort the results as per the requirement, using the Northwind database


*** Resolution ***

1. Open a web site in FrontPage
2. Insert a new page and name it as test.asp
3. Insert a Form and delete the Reset button.
4. Insert Database Results within the form.
5. Select ASP and the Sample database Connection. Click Next.
6. Select the Custom Query option and click on the Edit button
7. Type the query - Select Distinct City from Employees
8. Click on the Edit List Button and remove all fields except City and
click
Next.
9. Choose the Dropdown List -one record per item
10. The Display Values and the Submit Values are same - City
11. Click Next and Finish the Wizard.
12. Then right click on the form and select Form Properties
13. Choose the Send-to-other option and click on the Options button.
14. In the Action field, type test.asp and click Ok.
15. Click Ok.
16. Go to Insert menu àDatabaseàResults
17. Select ASP and the Sample database Connection. Click Next.
18. Select the Custom Query option and click on the Edit button
19. Type the query - Select * from Employees where City = ‘::city’ Order By
::SortColumn:: and verify the query.
20. Click Next.
21. Click on the More Options button and click on the Defaults button.
22. Select the SortColumn field and click on the Edit button.
23. In the value field, type City
24. Click Ok two times and click Next two times and Finish.
25. In the New database results region, Select the field you want to sort
the
result.
26. Select the field, go to Insert menu and select the Hyperlink.
27. In the resulting window, type in test.asp in the Address field and
click on
Parameters button.
28. Click on the Add button. Type City in the Name field and <%=request
("city")%>
in the value field.
29. Click on the Add button again. Type Sortcolumn in the Name field and
Firstname%20Desc in the Value field. (The results will be sorted on the
basis of
FirstName, %20 - to represent the space character and Desc - Sort the
results in
the descending order).
30. Click Ok two times.


Hope this helps


regards

Hari
MSFT

This posting is provided "as is" with no warranties and confers no rights
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top