Microsoft KB Archive/922685

= How to create a database results page that is based on a value in a drop-down list in FrontPage 2003 =

Article ID: 922685

Article Last Modified on 8/7/2006

-

APPLIES TO


 * Microsoft Office FrontPage 2003

-





INTRODUCTION
This 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.



MORE INFORMATION
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 </li> Click Next.</li> Click Edit List, remove any existing fields except for the City field, and then click OK.</li> Click Next.</li> Click Dropdown List -one record per item in the Choose formatting options for the records returned by the query list, and then click Next.</li> Click Finish.</li></ol>

If you want to sort the database results page, follow these steps. <ol> Right-click the form, and then click Form Properties.</li> Click Send to other, and then click Options.</li> In the Action box, type Test.asp, and then click OK two times.</li> On the Insert menu, point to Database, and then click Results.</li> Click ASP, click Use a sample database connection (Northwind), and then click Next.</li> Click Custom query, and then click Edit.</li>  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 You receive a &quot;Database Results Wizard Error&quot; error message when you browse an ASP page after you upgrade to FrontPage 2003 or to FrontPage 2002 S907307

871267 You receive an &quot;Unable to find operator in query string&quot; error message when you use the ORDER BY parameter in a custom SQL query in FrontPage 2003

</li> Click Verify Query, and then click OK two times.</li> Click Next, and then click More Options.</li> Click Defaults.</li> <li>Select the SortColumn field, and then click Edit.</li> <li>In the Value box, type City, and then click OK three times.</li> <li>Click Next two times, and then click Finish.</li> <li>In the database results area, select the field that you want to use to sort the results.</li> <li>On the Insert menu, click Hyperlink.</li> <li>In the Address box, type Test.asp, and then click Parameters.</li> <li>Click Add.</li> <li>Click Add, type City in the Name box, type <%=request (&quot;City&quot;)%> in the Value box, and then click OK.</li> <li>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.</li> <li>Click OK two times.</li></ol>

Keywords: kbcode kbhowto KB922685

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.