Defining a Data Source in the ColdFusion Administrator
In this task, users running ColdFusion locally via Apache, Internet Information Server (IIS), or as a standalone Web server will define a data source from within the ColdFusion administrator.If you're on a Macintosh or Windows machine and your remote site is on a network (or FTP) server other than your computer, the good news is that you don't have to worry about defining a data source. The bad news is that someone will have to do it for you. If you're using ColdFusion over a network on a computer other than your own, you'll need to tell that server administrator that you need a DSN created, with the name dante, that the database is called dante.mdb, and that it's a Microsoft Access database. You'll also need to tell your administrator where the database file is located. (Most server administrators store database files outside of the Web root for security, so ask your server administrator where you should put the database.) Finally, ask your administrator for the Remote Development Services (RDS) password that will enable you to access your data source while you're developing. RDS gives Dreamweaver (and HomeSite) access to the ColdFusion server, which enables you to use the Dreramweaver environment to look in your database, write server behaviors, build queries, and perform other operations that depend on information from the server. She or he will know how to take it from there.If you're not running ColdFusion locally, skip the rest of this section and go bug your network administrator. After the administrator has you set up, skip ahead to the section of this lesson entitled "Building the Registration Form."NoteRegardless of your configuration, make sure you've copied the database to the Web server. You or your network administrator will need to browse to the database as part of creating the DSN, and you can do that only if the database is there. If you're running ColdFusion locally through IIS or as a standalone Web server, please read on. Because the specific steps vary slightly for the databases on Windows and Macintosh, we'll list the steps separately for each platform.
Defining a Data Source: Windows
1. | Choose Start > Programs > Macromedia > ColdFusion MX 7 > Administrator. |
This page is your interface to ColdFusion server management. Through this page you'll create DSNs, set caching and session management, and perform any number of server management tasks.
2. | In the password screen, enter your password. |
This is the password you chose when you installed ColdFusion.[View full size image]

3. | In the navigation bar on the left, click the Data Sources link. Expand the Data & Services section if necessary. |
The Data Sources link takes you to a screen where you can create ColdFusion DSNs.[View full size image]

4. | In the Add New Data Source box, enter dante as the Data Source Name, and choose Microsoft Access from the Driver drop-down menu. Click the Add button. |
Several data sources are automatically installed when you install ColdFusion, so don't be surprised if you see several listed on this screen. They're used for the tutorials that ship with ColdFusion. The tutorials are a good resource to help you improve your ColdFusion skills, and should be helpful after you finish this book (if not sooner).Remember, a data source comprises a unique name, a driver, and a path to the database. In this step, you're taking care of two out of three of these requirements.[View full size image]

5. | In the Microsoft Access screen, click the Browse Server button beside Database File. Navigate to C:\CFusionMX7\db\, select the dante.mdb file and click Apply. When you're finished, click Submit. |
[View full size image]


6. | Click Logout to exit the ColdFusion Administrator. |
You're finished creating the ColdFusion DSN, and your site is now fully ready for action.

Defining a Data Source: Macintosh
1. | Launch a Web browser and open the ColdFusion Administrator login page. In the default install, the URL is http://127.0.0.1:8500/cfide/administrator/index.cfm |
This page is your interface to ColdFusion server management. Through this page you create DSNs, set caching and session management, and perform any number of server management tasks.
2. | In the password screen, enter your password. |
This is the password you chose when you installed ColdFusion.[View full size image]

3. | In the navigation bar on the left, click the Data Sources link. Expand the Data & Services section if necessary. |
The Data Sources link takes you to a screen where you can create ColdFusion DSNs.[View full size image]

4. | In the Add New Data Source box, enter dante as the Data Source Name, and choose Other from the Driver drop-down menu. Click the Add button. |
Several data sources are automatically installed when you install ColdFusion, so don't be surprised if you see several listed on this screen. They're used for the tutorials that ship with ColdFusion. The tutorials are a good resource to help you improve your ColdFusion skills, and should be helpful after you finish this book (if not sooner).Remember, a data source comprises a unique name, a driver, and a path to the database. In this step, you're taking care of two out of three of these requirements.[View full size image]

5. | In the Other screen, fill in the parameters given below. When you're done, click Submit. |
JDBC URL: jdbc:pointbase:dante,database.home=/Applications/ColdFusionMX7/db Driver Class: com.pointbase.jdbc.jdbcUniversalDriver Driver Name: pointbase User Name: PBPUBLIC Password: PBPUBLIC At the end of the JDBC URL, enter the path to your database file. If you put dante.dbn in a different directory, put the path to it there.[View full size image]


6. | Click Logout to exit the ColdFusion Administrator. |
You're finished creating the ColdFusion DSN, and your site is now fully ready for action.
