To use a database as a source of dynamic content for your Web pages, you need to use an application server for creating database queries and accessing the database. You also need a database driversoftware that acts as a translator between the application server and the database. The type of database driver you use depends on the server technology you use, as shown in Table 4.1. The database driver is also database-specific. For example, if you are using ASP as your application server and Access for your database, you need to use an Access-specific driver.
If you're using Windows, database drivers are installed with application servers, with database systems, and as part of a Windows installation. If you need to download and install a database driver, installation information for the driver is included with the driver documentation. If you're using a Macintosh, the database drivers are installed when you install the application server.
Many Open Database Connectivity (ODBC) drivers are installed with Windows. For example, if you use ASP with an Access database, an Access driver is already available for your use. Other ODBC drivers are installed when you install application servers. If you are using a local Web server on Windows, you can check to see if the ODBC driver you need is already installed.
To check for ODBC drivers:
When you install ColdFusion, Java Database Connectivity (JDBC) drivers that you can use to create a database connection from Dreamweaver are installed. You choose a driver when you create a data-source connection in ColdFusion, as shown in "To connect to a data source using ColdFusion," later in this chapter. JDBC and ODBC are very similar technologies.
The PHP installation includes a MySQL driver that can be activated in the php.ini file to enable you to create PHP/MySQL database connections from Dreamweaver. Once you install and configure MySQL as detailed earlier in this chapter, the MySQL database driver is activated.
If you are using JSP, you will need a JDBC driver to create a database connection from Dreamweaver. Sun Microsystems provides a list of JDBC drivers and vendors at http://developers.sun.com/product/jdbc/drivers.
If you are using ASP.NET, you will need an Object Linking and Embedding Database (OLE DB) driver to create a database connection from Dreamweaver. If you're using Microsoft Access or Microsoft SQL Server, you can get OLE DB drivers by downloading and installing Microsoft Data Access Components (MDAC) at http://msdn.microsoft.com/data/mdac/downloads. For more information on MDAC and ASP.NET connections, see Dreamweaver Help (F1).