Retrieve 2

Retrieve Information Using a Hyperlink with Parameters

This page will give you more practice in retrieving information from your database and will show you how information can be retrieved in tow stages: we will have a first page that displays only basic information about each employee but with a hyperlink for each record allowing detailed information about a specific employee to be retrieved.

In FrontPage 2000, you can pass information from one page to another as a hyperlink with parameters. You can use this technique to pass information to a page that contains
a Database Results Wizard and display specific records from a database.

Create the Hyperlink Page

With the following example, you will create a page that displays the ID number, first name, and last name of each employee in the database. Using a hyperlink with the ID number, you will pass the ID number as a parameter to another page to display the full record of the individual employee. To do this, follow these steps:

  1. In Folders view, create two new pages. Name these pages "employees.asp" (without the quotation marks) and "record.asp" (without the quotation marks).
  2. Open employees.asp in page view.
  3. On the Insert menu, point to Database, and click Results.

  4. In Step 1 of the Database Results Wizard, click to select the Use an existing database connection button. Click to select Volcano2 from the list.



    Click Next.
  5. In Step 2 of the Database Results Wizard, make sure the Record source option is selected and Employees is selected from the list. Click Next.

  6. In Step 3 of the Database Results Wizard, click Edit List.

  7. In the Displayed Fields dialog box, click to select all of the items in the Displayed fields list except ID, FirstName, and LastName. Click Remove.



    Click OK.
  8. In Step 4 of the Database Results Wizard, click Next.
  9. In Step 5 of the Database Results Wizard, click the Display all records together button, and click Finish.

  10. Right-click <<ID>> in the ID column of the results table, and click Hyperlink.
  11. In the Create Hyperlink dialog box, click once only to select record.asp, and click Parameters.
  12. In the Hyperlink Parameters dialog box, click Add.

  13. In the Add Parameter dialog box, click to select ID in the Name list, and click OK.



    Click OK until you return to your page.
  14. Save and close employees.asp.


The <<ID>> will now be a hyperlink. When you view the page in a Web browser, the list of ID numbers will be hyperlinks. When you click an ID number, the ID will be passed to the next page. The next page will display all of the information for this ID number.

Create the Page to Display the Full Record

To create the page that will display the entire record, follow these steps:

  1. Open record.asp.
  2. On the Insert menu, point to Database, and click Results.

  3. In Step 1 of the Database Results Wizard, click to select the Use an Existing Database Connection option. Click to select Volcano2 from the list.



    Click Next.
  4. In Step 2 of the Database Results Wizard, click Record Source..



    Click Next.
  5. In Step 3 of the Database Results Wizard, click More Options.



    In the More Options dialog box, click Criteria.



    In the Criteria dialog box, click Add.



    In the Add Criteria dialog box, click to select ID in the Field Name list, and click to select Equals in the Comparison list.



    Click OK.
  6. In Step 4 of the Database Results Wizard, click Next.
  7. In Step 5 of the Database Results Wizard, click to clear the Add Search Form check box, and click Finish.

  8. Save the page.