|
 |
 |
 |
 |
Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms
of Use |
Trademarks
Article ID: 922685 - Last Review: August 7, 2006 - Revision: 1.1 How to create a database results page that is based on a value in a drop-down list in FrontPage 2003This article describes how to create a database results page that is based on a value in a drop-down list in Microsoft Office FrontPage 2003.
Note After you create a database results page, you can sort this page to fit your needs. To create a database results page that is based on a value in a drop-down list, follow these steps: - Open a Web site in FrontPage 2003.
- Create a new Web page, and then name it Test.asp.
- On the Insert menu, point to Form, click Form to add a form on the Web page, and then delete the Reset button.
- On the Insert menu, point to Database, and then click Results.
- Click ASP, click Use a sample database connection (Northwind), and then click Next.
- Click Custom query, and then click Edit.
- Type the following code in the SQL Statement pane, and then click OK:
Select Distinct City from Employees - Click Next.
- Click Edit List, remove any existing fields except for the City field, and then click OK.
- Click Next.
- Click Dropdown List -one record per item in the Choose formatting options for the records returned by the query list, and then click Next.
- Click Finish.
If you want to sort the database results page, follow these steps. - Right-click the form, and then click Form Properties.
- Click Send to other, and then click Options.
- In the Action box, type Test.asp, and then click OK two times.
- On the Insert menu, point to Database, and then click Results.
- Click ASP, click Use a sample database connection (Northwind), and then click Next.
- Click Custom query, and then click Edit.
- Type the following code in the SQL Statement pane:
Select * from Employees where City = '::City::' Order By ::SortColumn:: ASC
Note
For more information about supported SQL statements, click the following article numbers to view the articles in the Microsoft Knowledge Base:
907307Â
(http://kbalertz.com/Feedback.aspx?kbNumber=907307/
)
You receive a "Database Results Wizard Error" error message when you browse an ASP page after you upgrade to FrontPage 2003 or to FrontPage 2002 S907307
871267Â
(http://kbalertz.com/Feedback.aspx?kbNumber=871267/
)
You receive an "Unable to find operator in query string" error message when you use the ORDER BY parameter in a custom SQL query in FrontPage 2003
- Click Verify Query, and then click OK two times.
- Click Next, and then click More Options.
- Click Defaults.
- Select the SortColumn field, and then click Edit.
- In the Value box, type City, and then click OK three times.
- Click Next two times, and then click Finish.
- In the database results area, select the field that you want to use to sort the
results.
- On the Insert menu, click Hyperlink.
- In the Address box, type Test.asp, and then click Parameters.
- Click Add.
- Click Add, type City in the Name box, type <%=request ("City")%> in the Value box, and then click OK.
- Click Add, type Sortcolumn in the Name box, type Firstname%20DESC in the Value box, and then click OK.
Note The ASC or DESC sort order can be defined in the SQL Statement field that is mentioned in step 7. - Click OK two times.
APPLIES TO- Microsoft Office FrontPage 2003
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
|
 |
 |
 |
 |
 |
 |
 |
| |