290 likes | 449 Views
Microsoft FrontPage 2003 Illustrated Complete. Integrating a Database with a Web Site. Objectives. Review database concepts Import a database into a Web site Create a data access page Use a data access page. Objectives. Send form results to a database Use an Active Server Page
E N D
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site
Objectives • Review database concepts • Import a database into a Web site • Create a data access page • Use a data access page Integrating a Database with a Web Site Unit N
Objectives • Send form results to a database • Use an Active Server Page • Create a Database Results region • Create a search form in a Web page Integrating a Database with a Web Site Unit N
Integrating a Database with a Web Site • You can send the form results to one of several places: • A text file • As a Web page • In a database • A page that displays database data must be saved as an Active Server Page with an .asp file extension • An Active Server Page is a dynamic Web page whose content changes as required Integrating a Database with a Web Site Unit N
Reviewing Database Concepts • A database is a collection of related tables that stores data about an entity • An entity is a person, place, thing, or idea • A table contains fields (also called columns) that describe the characteristics of the entity Integrating a Database with a Web Site Unit N
Reviewing Database Concepts (cont.) • The fields in the form store data about the entity • The data stored in the fields for one form create a record • The field that contains a value that uniquely identifies each record in the table is called the table’s primary key • You can create an AutoNumber field in the table, which automatically numbers records in sequential order, thereby creating a primary key Integrating a Database with a Web Site Unit N
Reviewing Database Concepts (cont.) • Lenders database in the Access program window Integrating a Database with a Web Site Unit N
Importing a Database into a Web Site • There are two ways to import a database into a FrontPage Web site: • Create the database in Access and copy and paste it into the Web site • Create a form in a Web page, then use FrontPage to create a database and a database connection using Access or another supported database program in which to store the form’s data Integrating a Database with a Web Site Unit N
Importing a Database into a Web Site (cont.) • No matter how you import a database, FrontPage automatically: • Adds the database file to the Web site • Creates the fpdb (for FrontPage database) folder in which to store the database file • Makes a connection to the database • A database connection specifies the name, location, and type of database you want to access from a Web site Integrating a Database with a Web Site Unit N
Importing a Database into a Web Site (cont.) • Add Database Connection dialog box Integrating a Database with a Web Site Unit N
Creating a Data Access Page • A data access page is a Web page that shows data from the database object on which the page is based • Users with the appropriate permission can use a data access page to view, add, delete, and sort records • The user must use a database program that supports data access pages, such as Access, to create a data access page object in the database and an HTML page that can be saved in a Web site Integrating a Database with a Web Site Unit N
Creating a Data Access Page (cont.) • Data access page in Access Page view Integrating a Database with a Web Site Unit N
Using a Data Access Page • Any changes made in the database are immediately reflected in the Web page • Any changes made to the data using the Web page are immediately reflected in the table Integrating a Database with a Web Site Unit N
Using a Data Access Page (cont.) • You can use buttons on the record navigation bar to browse, sort, and filter the records in any order • These actions only apply to the data you see in the Web page and do not affect the data as it is stored in the database • You can add, delete, and change records without affecting the data in the database Integrating a Database with a Web Site Unit N
Using a Data Access Page (cont.) • New record in the data access page Integrating a Database with a Web Site Unit N
Using a Data Access Page (cont.) • Record navigation bar buttons and their descriptions Integrating a Database with a Web Site Unit N
Sending Form Results to a Database • You can set a form to store the data it collects in a database table • Before the form can send data to a database, you must identify: • The database connection to use • The name of each form field in the form • Its matching field in the database • The form field names in the form and the filed names in the database do not have to have the same names Integrating a Database with a Web Site Unit N
Sending Form Results to a Database (cont.) • Form Properties dialog box • Options for Saving Results to Database dialog box Integrating a Database with a Web Site Unit N
Sending Form Results to a Database (cont.) • Modify Field dialog box Integrating a Database with a Web Site Unit N
Using an Active Server Page • An Active Server Page is a dynamic Web page that contains scripts to process the page • Active Server Pages contain data that is generated when the page is viewed using a Web browser • When an Active Server Page is used to display database data, the scripts in the page ensure that the data is current Integrating a Database with a Web Site Unit N
Using an Active Server Page (cont.) • Form Confirmation Page Integrating a Database with a Web Site Unit N
Creating a Database Results Region • A Database Results region displays data from the database object on which it is based • The Database Results region lets site visitors examine the data contained in a database object, but visitors cannot add, delete, or change the data in a Database Results region • A Database Results region is for viewing purposes only Integrating a Database with a Web Site Unit N
Creating a Database Results Region (cont.) • Database Results Wizard dialog box Integrating a Database with a Web Site Unit N
Creating a Database Results Region (cont.) • Database Results region in a Web page Integrating a Database with a Web Site Unit N
Creating a Search Form in a Web Page • A Database Results region can include a search form that lets the user query the table on which the Database Results region is based • The user can query the database table, but cannot change the table data • When you use the Database Results Wizard to set the criteria for a search form, the search form is automatically added to the Database Results region Integrating a Database with a Web Site Unit N
Creating a Search Form in a Web Page (cont.) • Add Criteria dialog box Integrating a Database with a Web Site Unit N
Creating a Search Form in a Web Page (cont.) • Lender List page after executing a search Integrating a Database with a Web Site Unit N
Summary • Reviewing database concepts • Importing a database into a Web site • Creating a data access page • Using a data access page Integrating a Database with a Web Site Unit N
Summary • Sending form results to a database • Using an Active Server Page • Creating a Database Results region • Creating a search form in a Web page Integrating a Database with a Web Site Unit N