Connecting Dreamweaver to a Database
Once you’ve set up a DSN (page 629), connecting Dreamweaver to the database is straightforward. Start by opening a Web page—any page, even a blank one (because the database connection is stored with the site, not any particular page). Then:
Open the Databases panel by choosing Window → Databases.
The Application panel group opens (see Figure 21-12).
Figure 21-12. The Application panel group contains four panels for working with dynamic database-driven Web sites. The Databases panel is described on page 634. (The Components tab contains advanced features for use with Cold Fusion, JSP and ASP.NET Web sites. It doesn’t do anything in the ASP or PHP server models.)
Click the + button at the top right of the panel. From the pop-up menu, choose the appropriate database connection.
The options you see depend on which server model you’ve selected. For example, if you’re using Cold Fusion, you get a list of all datasources (ColdFusion’s term for databases) defined in the Cold Fusion server. JSP developers see a long list of different database options. PHP developers see only MySQL Connection.
In this tutorial, which uses ASP, your options are Custom Connection String and Data Source Name (DSN). Since you’ve already created a DSN, choose Data Source Name. The Data Source Name window opens (see Figure 21-13).
Figure 21-13. The Data Source Name dialog box lets ...
Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.