Use this step-by-step guide to display images on your Web
site by using information from a Microsoft Access
database.
Microsoft provides programming examples for illustration only,
without warranty either expressed or implied. This includes, but is not limited
to, the implied warranties of merchantability or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language that is being demonstrated and with the tools that are used to create
and to debug procedures. Microsoft support engineers 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 requirements.
Step 1 -
Prerequisites
Install both Microsoft FrontPage and Microsoft Access The steps in this article requires that you have both
Microsoft FrontPage and Microsoft Access installed on the client
computer.
Instll the Component to Use the ASP Features in FrontPage Before you can use the ASP features in FrontPage 2000,
install the components listed in the following Microsoft Knowledge Base
article:
312638�
FP: What You Need to Use Active Server Pages (ASP) in FrontPage 2000
Step 2 - Create a New Personal
Web
- Start FrontPage. On the File menu, point to New, and then click Web.
- Click the Personal Web template. Type the URL of a new personal Web on a Web server that
supports Active Server Pages, for example:
http://localhost/mypersonalweb/
- Click OK to create the Web.
Step 3 - Add the Sample
Database to the Web
- Click the New Page button on the Standard toolbar.
- On the Insert menu, point to Database, and then click Results.
- Click Use a sample database connection
(Northwind), and then click Next.
- Click Cancel.
Step 4 - Modify the Employees
Table in the Database
- On the View menu, click Folders.
- Double-click the Fpdb folder, and then double-click the Fpnwind.mdb file to open the file in Microsoft Access.
- In Access, double-click the Employees table to open it.
- Click Design.
- Add a new field after the last field. Name this field FavoriteImage and set the data type to Text. Click Save. Click View.
- Set the FavoriteImage field by using the information in the following table:
For Employee Type this in the FavoriteImage field
------------------------------------------------------------------------
Nancy Davolio images/frontpag.gif
Andrew Fuller images/city.gif
All remaining employees images/sunset.gif
- On the File menu, click Exit to close the database and return to FrontPage.
- On the View menu, click Refresh.
Step 5 - Add a Database Results
Region
- On the View menu, click Page.
- On the Insert menu, point to Database, and then click Results.
- In the list of existing database connections, click Sample. Click Next.
- For record source, click Employees, and then click Next.
- Click Edit List.
- Remove all the fields except for the following:
LastName
FirstName
FavoriteImage
Click OK. Click Next. - Click Next again.
- Click Finish.
- Save the page and name it
Imagetest.asp.
Step 6 - Add the Image Links to
the Database Results
- Locate the database column value named
<<FavoriteImage>>, and then delete it.
- In the table cell where you just removed the column value,
insert the City.gif file from your Web.
- Right-click the image, and then click Picture Properties on the shortcut menu.
- Click the General tab, and then click Browse.
- Click Parameters.
- In the path field, remove the current path. Click Insert Field Parameter, and then click FavoriteImage.
- Click OK three times.
You will see a small broken image icon in
the table column. - Save the page, and then click the Preview in Browser button on the Standard toolbar.