YOU CAN GET ALL

Friday 11 February 2011

Frontpage, Access and Hiperlink data

untaianberita
This step-by-step article describes how to make images that are a part of database results into hyperlinks by using addresses from the same database. Additionally, this article describes how to display hyperlinked images on your Web site by using information from a Microsoft Access database.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

Microsoft Certified Partners - https://partner.microsoft.com/global/30000104

Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Step 1 - Prerequisites



Before you can use the ASP features in Microsoft FrontPage 2002, you must install the components that are listed in the following Microsoft Knowledge Base article:
318287 FP2002: What You Need to Use Active Server Pages (ASP) in FrontPage 2002
Important The steps in this article require that you have both Microsoft FrontPage and Microsoft Access installed on the client computer.

Step 2 - Create a New Personal Web

To create a new personal Web, follow these steps:
  1. Start FrontPage.
  2. On the File menu, point to New, and then click Page or Web.
  3. In the New Page or Web task pane, click Web Site Templates.
  4. Click the Personal Web template, and then type the URL of a new personal Web on a Web server that supports Active Server Pages, for example,http://localhost/mypersonalweb/
  5. Click OK to create the Web.

Step 3 - Add the Sample Database to the Web

To add the sample database to the Web, follow these steps:
  1. Click the Create a new normal page button on the Standard tool bar.
  2. On the Insert menu, point to Database, and then click Results.
  3. Click Use a sample database connection (Northwind), and then click Next.
  4. Click Cancel.

Step 4 - Modify the Employees Table in the Database

To modify the employees table in the database, follow these steps:
  1. Open the Web that you created in FrontPage.
  2. On the View menu, click Folders.
  3. Double-click the fpdb folder.
  4. Double-click the fpnwind.mdb file to open the file in Microsoft Access.
  5. Double-click the Employees table to open it.
  6. On the View menu, click Design View.
  7. Add two new fields after the last field:
    Field Name          Data Type -------------------------------- Hyperlink           Text FavoriteImage       Text 
  8. Name one field Hyperlink, name the other field FavoriteImage, and then set the data type to Text.
  9. Click Save.
  10. Click the View menu, and then click Datasheet View.
  11. Type the following information in the two new fields:
    For Employee             In the Hyperlink field     In the FavoriteImage field -------------------------------------------------------------------------------- EmployeeOne              http://www.msn.com         Images/Mycat.jpg EmployeeTwo              http://www.msnbc.msn.com       Images/Mount.gif All remaining employees  http://www.microsoft.com   Images/Parrot1.jpg 	
  12. Save your table, and then close Access.

Step 5 - Add a Database Results Region

To add a database results regions, follow these steps:
  1. Switch to FrontPage, and then on the View menu, click Page.
  2. On the Insert menu, point to Database, and then click Results.
  3. In the list of existing database connections, click Sample, and then click Next.
  4. For the record source, click Employees, and then click Next.
  5. Click Edit List, and then remove all fields except for the following:

    LastName
    FirstName
    FavoriteImage
  6. Click OK, and then click Next.
  7. Click Next again, and then click Finish.
  8. Name the page Imagetest.asp, and then save the page.

Step 6 - Add the Image Links to the Database Results

To add the image links to the Database Results, follow these steps:
  1. Locate the column value that has the name <> in the Database Results region, and then delete the column value.
  2. In the table cell where you just removed the column value, insert the Mycat.jpg image from your Web.
  3. Right-click the image, and then click Picture Properties.
  4. Click the General tab, and then click Parameters.
  5. In the path field, remove the current path, click Insert Field Parameter, and then click FavoriteImage.
  6. Click OK, and then click OK again. Note that you will see a small broken image icon in the table column.

Step 7 - Hyperlink the Images

To hyperlink the images, follow these steps:
  1. Right-click the broken image.
  2. Click Hyperlink, click Parameters, and then remove the whole path that currently exists.
  3. Click Insert Field Value, select the field that contains the Web address, click OK, and then click OK again.
  4. Save the page.

No comments:

Post a Comment