Connecting to the database

Connecting to the database

To connect to the database, you must create a ColdFusion data source called connTownsend that points to the sample database file.

To connect to the database:

  1. In Dreamweaver, open a ColdFusion page like send.cfm and view.cfm.
  2. In the Databases panel (Window > Databases), click the "RDS login" link, enter your RDS password, and click OK.
  3. Click Plus (+) on the Databases panel toolbar and select Microsoft Access Connection from the pop-up menu.
  4. In the CF Data Source Name text box, enter connTownsend.
  5. In the Database File text box, enter the path to the tutorial.mdb database file.

    If ColdFusion is running on your local computer and you installed Dreamweaver to its default location, the path is as follows:

    C:\Program Files\Macromedia\Dreamweaver 8\Tutorial_assets\cafe_townsend\data\tutorial.mdb

    This is a picture of the feature being described.

    If ColdFusion is running on a remote computer, enter the path to the database file you placed on the remote computer in Setting up the database (server on a remote computer).

    For more information, see the ColdFusion documentation in Dreamweaver (Help > Using ColdFusion).

  6. Click OK to create the connection.

    The connection appears in the Databases panel.

    This is a picture of the feature being described.

    If the connection does not appear in the panel, do one of the following:

    • Check the settings for the folder that Dreamweaver uses to process dynamic pages (see Specifying where to process dynamic pages).
    • Consult "Troubleshooting Database Connections" in Using Dreamweaver (Help > Using Dreamweaver).
  7. Expand the connTownsend branch, and then expand the Tables branch.

    If the Tables branch contains three tables as follows, the sample ColdFusion application is set up for the Getting Started with Dreamweaver tutorials. For more information, see Tutorial: Developing a Web Application.

    This is a picture of the feature being described.

    If the Tables branch does not contain the tables, click the Modify Data Sources icon in the Databases panel toolbar and double-check the connection parameters in Configuring and Administering ColdFusion MX. In particular, make sure the path to the database file is correct.



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