Creating a Connection to the Database


The final step you need to take to prepare for using the ColdFusion platform for your web pages is to create a connection to the database by using the ColdFusion Administrator. This connection enables the web server to access the contents of the database and tells the web server what driver should be used to "talk" to the database.

1.

Open the ColdFusion Administrator by typing http://127.0.0.1/CFIDE/administrator/index.cfm into your browser's address bar. In the login screen (see Figure 21.12), type your administrator password.

Figure 21.12. Log on to the ColdFusion Administrator.


2.

In the left navigation frame, click Data Sources. The Data Sources page in the right frame (see Figure 21.13) displays all the existing ColdFusion data source names and enables you to create new entries.

Figure 21.13. The Data Sources page enables you to manage your DSNs.


3.

Type dsnRetrosCycles in the Data Source Name field, choose Microsoft Access from the Driver dropdown (see Figure 21.14), and click Add.

Figure 21.14. Type the name of your new DSN and choose its type.


4.

In the Microsoft Access page (see Figure 21.15), click the Browser Server button next to Database File.

Figure 21.15. Click to Browse to your database file.


5.

In the next page (see Figure 21.16), browse to your database's location. If you are using Windows and used the default path referred to earlier, the path would be c:\InetPub\wwwroot\rcdb99840b\retros_cycles_99300d2.mdb.

Figure 21.16. Browse to your database.


6.

Click Apply.

7.

Back in the Microsoft Access Page, type a description for your DSN and then click Submit. After your DSN has been created, you will see it in the list of Connected Data Sources at the bottom of the page (see Figure 21.17), along with its status.

Figure 21.17. The DSN has been added and your database is connected to the ColdFusion server.


8.

Log out of the ColdFusion Administrator.

With your database in place and your connection created, you're ready to begin creating your pages and adding dynamic content to them. For this task, there is no better tool than Dreamweaver, which is covered in depth in Part V, "Dreamweaver 8."



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net