Creating form demographic and saving to Access database.

1. Open a new page at the web site   that you created in the previous unit and save the page as demographic.asp  and Create the following form with a table.

First Name  
Last Name

2. Right click on the form and select form properties.

You will see:

Form Properties

a. Send to file or e-mail
b. Send to database - can create access data base or connect to already existing one.
c. Send to other -custom form handler

3. Select the send to database radio button You will see:

form properties send to database

4. Click the option button to display the saving result dialog. You will see:

saving to access database

5.  Click on create database. The database created is an Access 2003 data base. You will see:

conformation of creation of access database

6. Click ok, You will see:

saving to access database

7. Click additional fields,  You will see.

Additional fields

8. Click on remote computer, click remove and repeat for browser type, timestamp, and user name.  Click OK.

9. Save the file, tap F12 and enter data.

10. After you have entered data for several people close IE.

11. Go to the FPDB folder and open it up.  You should be able to see the database you created.  Double click on the database, which will bring up the access database. Click on the table created and you will see the data you entered.

12. At this point in Access you can create additional tables, queries, etc.  ( I suggest that you take a course in access to learn the complex properties that are available to you.)  When you create additional tables you can create forms to input data into the additional tables using the database connection to lock your forms on to the database.

13. When creating a database first determine what the desired output of the program is.
14. Then brain storm on the data fields you willl need to obtain the desired output.
15. Then group repeating fields into seperate tables.
16. Define a primary key for each table.  A primary key is unique, not null, and the first index of the table.
17. Identify the common fields between tables. A common key must be the same data type.
18. Define the releationship between the tables(Joins)One to Many - the primary table has a one to many releationship to the releated table(the common key here is called the Foreign Key.  If we use SSN as a common key then in the primary table the unique SSN can only be in one record where in the releated table the unique SSN (Foreign Key) may appear 0 to many records. In a One to One the unique SSN can only appear once in the releated table as in the primary table.  In a Many to Many releationship each common field can appear many times in each table.
19. In a One to Many join Referential Intergity, Cascade Update, and Cascade Delete are enable to prevent orphans and other anolomilies.
20. Referential Intergity will not let you put a record in the related table in the common field unless it already has been entered into the primary key in the primary table.
21. Cascade Update will change all of the records in the releated tables foreign key if the primary key is changed in the primary table.
22. Cascade Delete will remove all of the records in the releated table if a specific primary key is deleted.

24. A database connection specifies the name, location and type of database that you want to access.
25. A file-based connection is made when you import an access database into a frontpage web site.
26. Expression web creates the database connection automatically when you import a database into it.
27. A system DSN (System Data Source Name) connection is made when you connect a database that is stored on a web server to a FrontPage web site.
28. A network connection is made to a database server, which is a server that is dedicated to managing a database.
29. A custom connection is one in which you use a file that contain the commands to define the necessary connection information between the database and the frontpage web site.
30. When you paste a database into a web site a folder name fpdb is created.
31. To verify the database connection, tools, web settings, database. FrontPage verfies the database connectionl.
32. To use the database results wizard, the web site must be enabled to run Active Server Pages(ASP).
33. An ASP web page includes client-sided and server-sided scripts that process the page.
34. A folder on a web server that permits the execution of scripts is called an executable folder.
35. A Database Results region is a component in a web page that contain HTML code and client-side and server-side scripts that retrieve and display database data in the web page.
36. The Database Results Wizard asks you a series of questions about the database object.
37. A filter is a set of restrictions that you place on the records in a table or query to display a subset of a table's or query's records.
38. The title and format of the database results region can be modified:
39. The database results wizard allow you to create a search form to query the database and filter records with the query.
40. You must configure a form to save the results of the form to the database:
41. A data access page is a web page that users a form to display data from the access table or query.
42. You must use access to create a data access page.
43. You can modify the data access page in expression web.
44. When a data access page is based on a table, you can use the record navigation bar to display, add, change, delete, save, sort and filter records in the table.
45 When the data access page is based on a select query, you may or may not be able to use add, change, delete, or save records.

Data Access Page Record Navigation Bar Buttons
First Displays the first record
Previous Displays the previous record
Next Displays the next record
Last Displays the last record
New Clears the fields in the data access page so that a new record can be entered
Delete Deletes the current record
Save Saves the current record
Undo Reverses the previous action
Sort Ascending Sorts the records in ascending order based on the current active field
Sort Descending Sorts the records in descending order based on the current active field.
Filter by Selection Lets you set a filter to display a subset of the records using the value in the current active field.
Filter Toggle Button Applies a filter or removes the currently applied filter.
Help Opens the Access Data Pages Help window.

Best Practices:

1.  Do not enforce cascade delete except when you are managing the web site.  A user might accidently deleted the primary record in the primary table and all of he related records will be deleted.