Creating a database connection

Creating a database connection

The final step of the setup process is to create a connection to the database.

If your web server is running on your local computer, you can use the data source name (DSN) that Dreamweaver created during installation to quickly connect to the sample database. To learn more about DSNs, see Using a DSN in Using Dreamweaver.

To create a database connection in Dreamweaver:

  1. Open any ASP page in Dreamweaver, and then open the Databases panel (Window > Databases).
  2. Click the Plus (+) button on the panel and select Data Source Name (DSN) from the pop-up menu.

    The Data Source Name (DSN) dialog box appears.

  3. Enter connTownsend as the connection name.
  4. (Windows only) Do one of the following:
    • If your server is on your local computer, select the Using Local DSN option.
    • If your server is on a remote system, select the Using DSN on Testing Server option.

    Macintosh users can ignore this step because all database connections use DSNs on the testing server.

  5. Click the DSN button and select CafeTownsend from the list of DSNs.

    If you’re using Dreamweaver on a Windows computer, during installation, Dreamweaver created a DSN called CafeTownsend, which points to the Microsoft Access database in the Dreamweaver application folder.

  6. Click Test.

    Dreamweaver attempts to connect to the database. If the connection fails, do the following:

    • Double-check the DSN.
    • Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying where dynamic pages can be processed).
    • Consult Troubleshooting Database Connections in Using Dreamweaver.
  7. Click OK.

    The new connection appears in the Databases panel.

The sample ASP application is now set up for the Getting Started with Dreamweaver tutorials. For more information, see Tutorial: Developing a Web Application.



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly