Core Training for Microsoft FrontPage 2002

Connecting Your Web Site to a Database


Setting Up a Database Connection

1 To start setting up a database connection to a disk-based Web site, click the Tools menu, and click Web Settings.
2 To connect a database to the Web site, in the Web Settings dialog box, click the Database tab.
3 To begin adding a database to the Web site, in the Web Settings dialog box, on the Database tab, click Add.
4 To assign a name to the database, in the New Database Connection dialog box, in the Name text box, type TGC_Connect.
5 To begin inserting a file in the database, in the New Database Connection dialog box, click Browse.
6 To select a file, in the Database Files In Current Web dialog box, double-click the Database folder.
7 To insert a file in the database, in the Database Files In Current Web dialog box, click the GardenCo.mdb file, and click OK.
8 To begin including the TGC_Connect database in the Web site, in the New Database Connection dialog box, click OK.
9 To verify the existence of the TGC_Connect database, in the Web Settings dialog box, click Verify.
10 To insert the TGC_Connect database in the Web site, in the Web Settings dialog box, click OK.

Publishing a Web Site for Use with a Database

1 To start publishing your Web site to a Web server, click the File menu, and click Publish Web.
2 To assign a name to the Web server, in the Publish Destination dialog box, in the Enter publish destination text box, type http://.
3 To accept the assigned name, in the Publish Destination dialog box, click OK.
4 To create a Web site at the specified location, in the message box, click OK.
5 To publish the Web site to the Web server, in the Publish Web dialog box, click Publish.
6 To open the Web site in a default browser and window size, in the message box, click the Click here to view your published web site link.
7 To begin browsing the site in the browser window, click once below the scroll box on the vertical scroll bar.
8 To test the links of the Web site, in the browser window, position the mouse pointer over Common Questions until an icon of a hand appears, and click Common Questions.
9 To return to the Home page of the Web site, in the browser window, on the Standard Buttons toolbar, click the Back button.
10 To return to FrontPage, in the upper-right corner of the browser window, click the Close button, and then click Done.

Adding Database Search Capabilities

1 To begin adding a database interface page to the GardenCoDB Web site, click the File menu, point to New, and click Page or Web.
2 To begin selecting a template for the new page, in the New Page or Web task pane, in the New from template section, click Web Site Templates.
3 To select a template, in the Web Site Templates dialog box, click Database Interface Wizard.
4 To add a database interface page to the Web site, in the Web Site Templates dialog box, in the Options section, click the Add to current Web check box, and click OK.
5 To select the database, in the Database Interface Wizard, click the Use an existing database connection option button, and click Next.
6 To create a catalog using the contents of a table, click the arrow next to the drop-down box, click Products, and click Next.
7 To accept the default settings on this page and proceed to the next page of the wizard, click Next.
8 To specify the type of page that you want to create, in the Database Interface Pages box, click the Submission Form check box, and click Next.
9 To accept the default location of the new page at /TGC_Connect_interface/Products, click Finish.
10 To start applying the theme of the Web site to the results_page.asp file, click the Format menu, and click Theme.
11 To select the theme, in the Apply Theme to section, in the theme list, click (Default) Modified Nature theme, and click OK.
12 To begin modifying the borders settings of the results_page.asp file, click the Format menu, and click Shared Borders.
13 To modify the borders settings, in the Shared Borders dialog box, click the Reset borders for current page to web default check box, and click OK.
14 To save the results_page.asp file, on the Standard toolbar, click the Save button.
15 To add the results_page.asp file to the navigation structure of the Web site, on the Views bar, click the Navigation icon.
16 To add the file to the Products page, in the Folder List, position the mouse pointer over results_page.asp, press and hold down the mouse button, drag and hold it below the Gifts and Gadgets box in the Navigation window until a black, dotted line connects the Products box to the results_page.asp box, and release the mouse button.
17 To open the products.htm file in the Page view editing window, in the Navigation window, double-click Products.
18 To begin adding product information in the products.htm file, click at the end of Gifts and gadgets!, and press the ENTER key two times.
19 To change the font to regular text, on the Formatting toolbar, click the Bold button.
20 To include product information, type Click.
21 To begin inserting a hyperlink to the text, press and hold down the SHIFT key, click to the left of the word Click, release the SHIFT key, and on the Standard toolbar, click the Insert Hyperlink button.
22 To choose a file to hyperlink to the text, in the Insert Hyperlink dialog box, double-click the TGC_Connect_interface folder, double-click the Products sub-folder, click results_page, and click OK.
23 To save the changes made to the products.htm file, on the Standard toolbar, click the Save button.

Refining a Database Interface Page

1 To start testing and refining the database interface page, on the Standard toolbar, click the Preview in Browser button.
2 To test a link on the Products page, click the Click here to see our Product Catalog! link.
3 To return to FrontPage, click the Close button in the upper-right corner of the browser window.
4 To begin refining the Results Page, click the Table menu, point to Select, and click Table.
5 To delete the selected table, click the Table menu, and click Delete Cells.
6 To delete the horizontal rule, click once to the right of the scroll box on the horizontal scroll bar, click the rule, and press the DELETE key.
7 To begin refining the database, click This is the start of a Database Results region (yellow border), click the Format menu, and click Properties.
8 To accept the current selection of the TGC_Connect database, in the Database Results Wizard, click Next.
9 To accept the default record source, click Next.
10 To begin editing fields that will be displayed in the database results, in the Database Results Wizard click Edit List.
11 To select fields that will be included in the database results, in the Displayed Fields dialog box, in the Displayed fields list, double-click Product ID.
12 To start filtering the search form, click More Options.
13 To filter the search form, in the More Options dialog box, click Criteria.
14 To begin adding a search criteria, in the Criteria dialog box, click Add.
15 To add a search criteria, in the Add Criteria dialog box, click the arrow next to the Field Name box, click CategoryID, and click OK.
16 To include the new criteria for the CategoryID field, in the Criteria dialog box, click OK.
17 To sort database results, in the More Options dialog box, click Ordering, and then, in the Ordering dialog box, in the Available fields box, double-click ProductName, and click OK.
18 To set a numerical default value for the search form, in the More Options dialog box, click Defaults.
19 To begin adding a default value to CategoryID, in the Defaults dialog box, click Edit.
20 To specify a default value, in the Default Value dialog box, in the Value text box, type 1, and click OK.
21 To accept the new default value, in the Defaults dialog box, click OK.
22 To display all the records matching the criteria, in the More Options dialog box, click the Limit number of returned records to check box, click OK, and then, in the Database Results Wizard, click Next.
23 To accept the default formatting options for the records, in the Database Results Wizard, click Next.
24 To choose a display option for records, click the Display all records together option button, and click Finish.
25 To add product information, in the results_page.asp file, click below the Products -- View page banner (dotted line), and type Which.
26 To begin previewing the page in a browser window, on the Standard toolbar, click the Preview in browser button.
27 To start testing the search criteria in the Products -- View page, click in the CategoryID text box, type 3, and click Submit Query.
28 To preview the search results, click once below the scroll box on the vertical scroll bar.
29 To return to FrontPage, in the upper-right corner of the browser window, click the Close button.

Adding Data Collection Capabilities

1 To begin creating a mailing list form, on the Standard toolbar, click the arrow next to the Create a new normal page button, and click Web.
2 To select a template for the mailing list form, in the Web Site Templates dialog box, in the Web Site tab, click Database Interface Wizard.
3 To add the template to the GardenCoDB Web site, in the Web Site Templates dialog box, in the Options section, click the Add to current Web check box, and click OK.
4 To connect the Web site to a database, click the Use an existing database connection option button, and click Next.
5 To specify a table for the database connection, click the arrow next to the drop-down box, click Customers, and click Next.
6 To accept the default settings, click Next.
7 To specify the type of page in the Database Interface Pages box, click the Results Page check box, and click Next.
8 To accept the default location of the new page, at /TGC_Connect_interface/Customers, click Finish.
9 To start applying the theme of the Web site to the submission_form.asp file, click the Format menu, and click Theme.
10 To select the theme, in the Themes dialog box, in the Apply Theme to section, in the theme list, click (Default) Modified Nature theme, and click OK.
11 To begin modifying the border settings of the Submission Form page, click the Format menu, and click Shared Borders.
12 To modify the borders settings, in the Shared Borders dialog box, click the Reset borders for current page to web default check box, and click OK.
13 To begin refining the submission_form.asp file, click the Table menu, point to Select, and click Table.
14 To delete the selected table, click the Table menu, and click Delete Cells.
15 To delete the horizontal rule, click the rule, and press the DELETE key.
16 To save the submission_form.asp file, on the Standard toolbar, click the Save button.
17 To begin adding the submission_form.asp file to the navigation structure of the Web site, in the Views bar, click the Navigation icon.
18 To add the file, in the Folder List, position the mouse pointer over submission_form.asp, press and hold down the mouse button, drag it below the home page in the Navigation window, until a black, dotted line connects the home page to the Customers-... box, and then release the mouse button.
19 To begin changing the page title of the submission_form.asp file, in the Navigation window, double-click the Customers-... box, and then, in the Page view editing window, double-click Customers -- New (page banner).
20 To assign a new title, in the Page Banner Properties dialog box, in the Page banner text box, triple-click the text, type Mailing List, and click OK.
21 To begin inserting a hyperlink on the Contact Us page, in the Folder List, double-click contact.htm.
22 To begin adding information on the Contact Us page, position the mouse pointer to the right of the fax number (206) 555-0101, click the mouse button, and press the ENTER key.
23 To align the text to the center of the page, on the Formatting toolbar, click the Center button, and type Join our mailing list!.
24 To select the text, press and hold down the SHIFT key, click to the left of the word Join, and release the SHIFT key.
25 To insert a hyperlink to the selected text, on the Standard toolbar, click the Insert Hyperlink button.
26 To select a page to hyperlink, click submission_form, and click OK.
27 To save the contact.htm file, on the Standard toolbar, click the Save button.
28 To begin testing the links on the Contact Us page, on the Standard toolbar, click the Preview in browser button.
29 To test the new link, position the mouse pointer over the Join our mailing list! link until the pointer changes to a hand, and click the link.
30 To return to FrontPage, click the Close button in the upper-right corner of the browser window.