Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a database with Frontpage?

Status
Not open for further replies.

pahjo

Programmer
Dec 27, 2000
10
0
0
US
I have an Access database which contains my inventory and I would like to have my website connected to my database somehow. It would be nice if I can let people view my inventory in my database through frontpage if they type in the product type. Is there any way I can accomplish this task? If so, will database security be an issue? Thank you for your time.

Pahjo
 
It is very possible. In fact, the "Getting Started" book that comes with the boxed edition of Frontpage has a section that goes into that very subject.

The book is set up as a tutorial of sorts, so the exercise in it is based on the Access sample database "Northwind" that you may, or may not, have installed when setting up Access. If you didn't install it, you will probably want to so you can test your new skills on a non-critical database.

I work with FP98, so I may be talking out-of-turn about FP2000. If your using the 2000 version but you don't have, or don't want to use the book you might want to check out this link:


It may give you the same info that comes from the "Getting Started" guide in a little different way.

Good luck on your project.
 
Note : you won't be able to test your connection on your local machine unless you have "IIS" already installed else you can only test it on the remote server where your web is located.

1)First you need to create a database connection :

Go to :
"Tools" menu,
"Web settings" submenu
"Database" tab
"Add .." Button
Give it a Name
if on your local drive your database must be located in your web root folder or lower : if so, select "File or folder in current web"
"Browse" button to retrieve your file name (sometimes if you have just added your file in the folder, you won't see it ie the folder content must be refreshed)

then click on the "Verify" button to check your connection
The OK Button

2) each time tou want to insert a table, a graph etc .. from your database connection :
"Insert" menu
select "Use an existing Database connection" and select the connection name you have just created in the drop-down list
then "Next" button
choose between an existing Table/query or create your own sql query
then next button
If not all fields are required; then click on "Edit list",
to select the Fields you need
if you need to enter some criteria (ex: choose Product ID etc ..) :
click on "Criteria"
Then "Add.." then select the field you need and check "Use this search form field" and chopose the operator
do it again for every single field to be filtered then "OK"
Ditto concerning the "Ordering Button"
Use the "Defaults" Button to define the initial values of your criteria fields
then "OK" then "Next"
then in the next 2 boxes select the correct options for you
then "Finish" button

Save your page with the ".asp" extension.


 
Adding to what Delorfra says, FP2000 has the nifty database results wizard (Insert, Database on the menu) which, if you don't have the database connection already set, will do that for you (the database must be imported to your site first). To do this, choose File, Import in FP2000 which will recognize the database and place it in a separate folder (usually fpdb) on your site.

Then the wizard will walk you through setting up the results region on a web page including options for adding a search bar, which can be used by viewers to search for particular terms. The terms used must match the data in your database exactly or the results will return no records found. That being the case, the search bar can be altered to a drop down list, if desired, after the fact. That way, you can assure the search terms used will work.

When going through the wizard, you'll see that you can choose to build your results from fields available in both tables and queries (database objects) that reside in the database, although only from one object per results region (unless you know SQL and can construct your own query that way).

Depending on how large and complex your database is, its probably a good idea to construct a query that includes only the results you want displayed on your web page. Then that can be your record source (step 2 of the database results wizard)for the database results on the web page.

One good resource is the FP2000: ASP Web Wizard 2000 for Databases (article id: Q206019) available on the MS Knowledge base at This gives a comprehensive look at how the database wizard works and what is needed to use it.

The BIG down side to using FP2000 is that these advanced features are reliant on the site being hosted on an NT web server running Internet Information Server with FP extensions installed. Best to know this up front -- good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top