Приглашаем посетить
Просвещение (lit-prosv.niv.ru)

Connecting to a Database

Table of Contents Previous Next

Connecting to a Database

When you have a lot of data about your site visitors, you'll want to save that information so that you can use the content. You can save the information in a form to a database by creating a database connection. A database connection is a connection that specifies the name, location, and type of database you want to access. You can create a new database, connect to an existing one, or connect to the sample Northwind database to try out the process. FrontPage comes with a wizard that creates one form for the visitor to submit information and another form for you to track the results. The Web site enables you to view, update, delete, or add records. To view the data once you set up the connection, your Web site must be hosted or published on a Web server configured with Active Server Pages (ASP), Active Data Objects (ADO), FrontPage 2002 Server Extensions or later or SharePoint Team Services, and Internet Information Server (IIS) version 4.0 (or later).

Create a Database Connection

graphics/1_icon.jpg

Click the New button list arrow on the Standard toolbar, and then click Web Site.

graphics/2_icon.jpg

Click Database Interface Wizard icon.

graphics/3_icon.jpg

Click OK.

graphics/4_icon.jpg

Click the option to create an ASP or ASP.NET page, and then click Next.

graphics/5_icon.jpg Click the option to create a new base, connect to an existing one, or connect to the sample Northwind database, and then click Next.

For the purposes of this example, create a new database.

graphics/6_icon.jpg

Type a name for your database connection, and then click Next.

graphics/7_icon.jpg

Edit the list of columns and submission fields for the database using Add, Modify, Delete, Move Up or Move Down, and then click Next.

graphics/8_icon.jpg

Click Next to continue.

graphics/11inf20.jpg

graphics/9_icon.jpg

Select the table or view you want to use.

graphics/10_icon.jpg

Specify a location for the database files (use the default location provided or click Browse to select a location), and then click Next.

graphics/11_icon.jpg

Click Next to continue.

graphics/12_icon.jpg

Select the check boxes for the database interface pages you want to use, and then click Next.

graphics/13_icon.jpg

Type a user name, password, and password confirmation.

graphics/14_icon.jpg

Click Finish.

graphics/11inf21.jpg

Did You Know?

You can connect a database to part of a form. Instead of creating an entire set of forms, you can also set up a database connection to an area in a form. To set up a database connection, click the Insert menu' point to Database' and then click Results. The Database Results Wizard dialog box opens. Click the Use A New Database Connection option or the Use An Existing Connection option, and then follow the wizards instructions to create a new database or use an existing database.


    Table of Contents Previous Next