Database (Access + ASP)
Download this in a WORD Doc...here
- To understand form
elements
- To configure a form to…
- Write a text file
- Send an email
- Send data to a
database
- To retrieve data from a
database
- To sort and order data
- To understand ASP pages
The Overview:
Under the database chapter will
be 3 new pages. Form Elements, My Survey, Survey
Results. The form elements page will demonstrate use
of all web form elements. After demonstrating the
basic elements you will design a thoughtful survey.
The survey results will be sent to an access
database table via your web form. The third web page
will present the survey results in a sorted order.
This entire process requires the use of ASP page,
Active Server Pages. ASP pages require a Microsoft
Internet Information Server, web server, to process
the ASP web page. Our CIAserver is an IIS 5.0 web
server. This will be the ultimate test of the server
when we all hit it with ASP web pages. Make sure you
thank Pete Carr for running this server.
Steps to Follow:
1.
Create the 3 new web pages under your
Database chapter.
a.
FormElements
b.
MySurvey
c.
SurveyResults
2.
On the Form Elements page, insert a
new web form using the Insert Menu. Look that the
forms menu and you will see all the form elements.
3.
Insert all the common web form elements and
add labels for each element.

4.
Double click each element and look at the
properties for each element. Each element will be
given a name.
5.
Note #1: Option Buttons have a GROUP
NAME. The group name allows several buttons to for a
group. Only ONE button can be selected in a group.
6.
Note #2: Form element names and group
names can only include letters and numbers. NO
SPACES ALLOWED!
Time to improve your first
web form.
1.
Add to your form and use a table to turn the
form into this…
2.

3.
With the use of a table, you can line up text
and form elements.
4.
Double click each element and name the
elements.
5.
Save your web form.
6.
Publish this form.
7.
Fill in the form several times.
8.
The form is sending data to a hidden text
file located in a _Private folder in your web
site.
9.
Open your live web site on the CIAserver.
10.
Look at the folders list.
11.
Locate the _Private Folder.
12.
Open the Text File.
13.
You have found your form results
Note: This hidden text
file is a backup file storing all form data sent in
by this form.
End of Lesson #1
20 Points:
Show me the
hidden text file on your CIAserver web site with
data sent in from this web form.
Page #2
My Survey
Overview:
You need to apply your web form
skills and design a quality survey. This survey will
be given to the senior class. You will present your
data results to the SurveyResults.asp web page.
Survey Requirements:
- Must use all form
elements.
- Needs to demonstrate
thought.
- Survey must not offend
anyone.
- Results will be shared
with everyone.
- Design will use a table.
- Design will include
clipart
- Data will be sent to a
database.
- Results will be sorted and
reported.
Steps to follow:
1.
On the page….MySurvey…insert a form.
2.
Insert the form elements.
3.
Add text labels in front of the element.
4.
Ask your questions.
5.
Build the survey.
6.
When finished…
7.
Add a table.
8.
Drag and drop questions and form elements
into rows and columns.
9.
Add some color.
10.
Add some clipart.
11.
Form survey is completed.
Time to Configure the Form
1.
Name each form element
a.
Double click element
b.
Give it a name
c.
NO SPACES IN NAME
2.
Option Button Name
a.
Group names must match
b.
Plus add element name
3.
Save the Form.
Send Form Results to
DATABASE
1.
Right click Form, select Form Properties
2.
Click on SEND TO DATABASE

3.
Then click OPTIONS…
4.
Click CREATE DATABASE…

5.
Notice: A database connection called
MySurvey will be created.
6.
Also Notice: A new Access database
called MySurvey.mdb was created in a folder called,
“fbdb” This folder stands for FrontPage Database.
7.
The FPDB folder can not be browsed with a web
browser. This can only be accessed via an ASP web
page.
8.
SAVE AS….ASP
The MySurvey
page needs to be saved as an ASP web page. This page
is connected to a database.
9.
SAVE AS….MYSURVEY.ASP
10.
Look at your folder list, you now have a FPDB
folder. Look into this folder and you will see a
database! COOL.
11.
Publish your web to the Web server.
12.
Go to your web site
13.
Fill in the survey and test the form.
20 Points:
Show me the
Access Database in your FPDB folder.
Page #3 Survey
Results
Overview:
This web page will display the
data from your survey. The page will query or
question the database and sort the data then present
it onto a web page. This is a fantastic process and
FrontPage includes a wizard to make it all happen.
Steps to follow:
1.
Open your web site. (Secondary-01)
2.
Open your SurveyResults page under the
database chapter.
3.
Use the INSERT menu, DATABASE
RESULTS.
4.
Go through the wizard and accept all the
defaults for the first time. This is a 5 step
wizard.

5.
When completed, you will see the results
page. This web page looks strange!

6.
SAVE AS…ASP….SurveyResults.asp
Publish your web to the server.
7.
Preview your Results page from the server.
8.
The server processes the database and build
the page.
9.
SORT THE DATA. Return to your web
page, double click the results area and figure out
how to sort the data. HELP: Look at step #3, more
options.
20 Points:
Show me the
RESULTS PAGE with 20 results. SORTED
BONUS:
Present a search option for
the results (10 pts)
Present data in a different
table design (10 pts) |