Connecting Dreamweaver to a Database

Dreamweaver MX works with a variety of different databases, from Access to the enterprise-level Oracle 9i. It connects to those databases in a variety of ways, depending on which server model you’ve chosen. For the PHP server model, for instance, Dreamweaver uses the MySQL database and connects directly to the MySQL server. In this tutorial, you’ll work with the Access database you downloaded.

Databases, like server models, come in many shapes and sizes: Microsoft Access, SQL Server, Oracle, FoxPro, MySQL, and so on. Fortunately, something called the ODBC protocol (Open Database Connectivity) serves as a common language that lets different operating systems and programs communicate with various databases. Each database vendor can create ODBC drivers that let you connect to its database.

Windows comes with the proper ODBC drivers preinstalled for many popular databases, including Access. To further simplify the process, Windows PCs offer what’s called a Data Source Name (DSN), a short nickname that lets you point to a particular database through a specific ODBC driver without having to remember a long complex series of codes to access your data. A DSN is one of the most common methods of connecting to a database on Windows. In fact, many Web hosting companies that provide Windows-based Web hosting services let you set up DSNs on their computers, making connecting to databases on remote Web servers much easier.

To set up a DSN, begin by opening the ...

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.