The Guest Book Database

You must first create an Access database called Guestbook.mdb and save it in the C:\Inetpub\Wwwroot\Tutorial directory. The database must have the fields with the properties described in the following table.

Field Name Data Type and General Properties
ID AutoNumber, Field Size=Long Integer, New Values=Increment, Indexed=Yes(No Duplicates)
TB1 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
TB2 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
TB3 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
TB4 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
MB1 Memo, Required=No, Allow Zero Length=Yes

After you create the database, you need to create a data source name (DSN) connection to the database so your ASP application can interact with it. The DSN must be created on the Web server that is running the ASP application. If you move the ASP application to a different Web server, you have to re-create the DSN on the new Web server. The following procedure describes how to create a DSN on Windows NT and Windows 2000.

  1. In the ODBC Data Source Administrator, select the ODBC icon.

  2. Select File DSN.

  3. Select Add, select Microsoft Access Driver, and click Next.

  4. Type in a descriptive name for your file DSN (Guestbook) and click Next.

  5. Click Finish, click Select, specify the location of the database file, and select OK.

  6. Click OK twice. After you specify the location of the database file, the ODBC Data Source Administrator creates a file DSN for it.