Exercise 3: Configuring A Database Connection - MACROMEDIA COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION MX Getting Started

Building coldfusion mx applications
Table of Contents

Advertisement

Exercise 3: Configuring a database connection

One of the most commonly used and most powerful features of ColdFusion is the ability to
connect to and manipulate data from a wide variety of databases. Like most ColdFusion
developers, you will probably use this capability often. To be able to connect to a database, you
must create a a data source in ColdFusion. A data source contains the information that
ColdFusion needs to be able to recognize and communicate with a database.
ColdFusion MX 7 includes a Dreamweaver extension that lets you create a data source without
having to leave the Dreamweaver environment. If you are not using Dreamweaver, you use the
ColdFusion Administrator to create data sources;
Administrator" on page 52
Using Dreamweaver to configure a data source
To create a ColdFusion data source without leaving the Dreamweaver environment, you need the
following information:
The type of connection to use
The name to call the data source
The location of the database file(s)
To configure a database connection in Dreamweaver:
Ensure that the site that contains the tutorial files is the current site.
1.
Select Create New > ColdFusion.
2.
On the Databases tab, click the + button.
3.
Select Microsoft Access Connection.
4.
In the CF Data Source Name text box, enter CompassTravel.
5.
Specify the Database File as
6.
c:\CFusionMX7\wwwroot\cfdocs\getting_started\db\CompassTravel.mdb.
Select the Use Default Username check box.
7.
When prompted for the password for this site, enter the ColdFusion Administrator password
8.
you specified when you installed ColdFusion MX 7.
Click OK.
9.
Continue with
10.
Configuring a data source in the Administrator
You can use the ColdFusion MX 7 Administrator to configure a data source. If you are running
ColdFusion in a UNIX environment, you must use the ColdFusion MX 7 Administrator to
connect to the PointBase database in the data source.
52
Chapter 5: Lesson 2: Configuring Your Development Environment
for more information.
"Exercise 4: Configuring debugging options" on page
see"Configuring a data source in the
55.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents