Database Results and VBScript

D

Daisy

Here's the scenario:
I created a web using FrontPage 2002 that displays data from an Access
2000 database. The purpose of this web is for consumers to be able to
search an online database of restaurant inspections. There are 4 pages
in the web. The first page is a search page that allows users to search
for a restaurant by entering all or part of the restaurant name. The
name of this search page is "dbsearch.asp".

The results of the search are displayed on a page called "results.asp".
The data source is "qryrestaurantlist".

When the user clicks a restaurant name on "results.asp", it brings up a
page with that restaurant's inspection history, called
"inspections.asp". The data source is "qryInspectionNumber".

When the user clicks an inspection date on "inspections.asp", it brings
up a page called "hazards.asp", which has details of that inspection.
The data source is "qryDetails".

What I can't figure out is how to get the restaurant's name and address
to appear as a "header" on "inspections.asp" and "hazards.asp". I could
include those fields in the underlying queries, but then they would be
repeated (i.e. if a restaurant was inspected 5 times, the restaurant
name and address would appear 5 times). What I want is for the
restaurant name and address to appear once at the top of each of those
pages, with the inspection details below it. I was able to put a text
box that displays the primary key of the selected restaurant, but not
the restaurant name and address. I was also able to put a text box that
literally displays the field names (i.e. FACILITY_NAME and ADDRESS_1),
but I want to display the data from that field (i.e. Dunkin Donuts, 10
Main Street).

Does FrontPage 2002 have this functionality? Does it require knowledge
of VPScript?

I can't find anything in the help files that is helpful. I have a
FrontPage 2000 developer's handbook, but there is nothing in there that
answers my question, and I don't have any books on FrontPage 2002.

Any help or guidance would be greatly appreciated.
 
T

Tom Miller

Daisy said:
Here's the scenario:
I created a web using FrontPage 2002 that displays data from an Access
2000 database. The purpose of this web is for consumers to be able to
search an online database of restaurant inspections. ----snip---
What I can't figure out is how to get the restaurant's name and address
to appear as a "header" on "inspections.asp" and "hazards.asp". ----snip---
Any help or guidance would be greatly appreciated.

There are 2 issues here. 1) FrontPage will generate .asp (active server
pages) scripts (eg. vbscript) for you. 2) you can't modifiy the script
because FP will get fussy.

So you have to take the code and turn it into your own code. Once you do
that , you can cut and paste in the commands to display those variables
once. You will have to retrieve the information from the database insert it
into those vars and then retrieve the rest of the information...... to
display in the tables that show the rest of the results.

Perhaps: www.asp101.com (I think this is right) will be helpful. or
www.w3schools.com

Tom

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top