Accessibility

ColdFusion Article

 

Connecting to a database with ColdFusion


Table of Contents

Setting up Dreamweaver to create ColdFusion applications

Setting up Dreamweaver to create ColdFusion pages and applications is very similar to setting up Dreamweaver for creating HTML pages:

  1. Open Dreamweaver.
  2. Select Site > Manage Sites from the main menu and then click New > Site from the Manage Sites dialog box to create a new site.
  3. On the Basic tab, enter the following information, clicking Next at the bottom of each screen:

    • Name: MyColdFusion
    • Yes, I want to use a server technology. Select ColdFusion as the server technology.
    • Edit and test locally, storing your files in C:\coldfusion8\wwwroot\MyColdFusion\
    • URL to browse to the root of your site: http://localhost:8500/MyColdFusion/

      Note: If you are using Microsoft IIS or Apache web server instead of the built-in JRun Web Server (JWS) for ColdFusion, do not use port 8500 in the URL. Also, the physical directory you specified in the previous step, "Edit and test locally, storing your files at," must correspond to the web root for your web server. Check your web server's documentation to figure out the physical directory of your web root.

    • No, do not copy files when I am done editing
  4. Click Done to create an initial site cache.
  5. If you have not already done so, download the Microsoft Access database sample file for this article.
  6. Unzip my_source.zip and move the MySource.mdb database file into the C:\coldfusion8\wwwroot\MyColdFusion\ folder you created in Step 3.

Note: Never save any database within the web root or any of its subfolders in a production web application. Doing so is a security risk because it enables users to download the database if they can guess its name and directory location.