Invoking database drivers

Invoking database drivers

An application must invoke a database driver to establish two-way communications with a database. A web application invokes a driver by using a connection string. A connection string consists of all the information (or parameters) required to establish a connection to a database. In its simplest form, a connection string specifies a driver and a database, as in this example:

Driver={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\Scaal\scaalcoffee.mdb

ASP connection strings can contain a Provider parameter specifying an OLE DB provider. If you omit this parameter, by default ASP uses the OLE DB provider for ODBC drivers. In the above example, the OLE DB provider for ODBC drivers would communicate with the ODBC driver, Microsoft Access Driver, which in turn would communicate with the Access database, scaalcoffee.mdb.

The parameters in a connection string may vary depending on the driver. Here’s a connection string for a SQL Server database called Cases located on a server named Hoover:

Driver={SQL Server};Server=Hoover;Database=Cases;
UID=DanaS;PWD=Queequeg

Dreamweaver simplifies the process of inserting connection strings into your pages by providing you with a dialog box in which to enter the different connection parameters. For example, here’s how the dialog box to define a connection looks when you’re developing a JSP application:

This is a picture of the feature being described.

After you complete the dialog box and click OK, Dreamweaver inserts the connection string in an include file in your site.



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly