beautypg.com

About connection strings – Adobe Dreamweaver CS3 User Manual

Page 518

background image

DREAMWEAVER CS3

User Guide

511

Note: Make sure you install MDAC 2.5 before installing MDAC 2.7.

You can download OLE DB providers for Oracle databases from the Oracle website at

www.oracle.com/technology/software/tech/windows/ole_db/index.html

(registration is required).

In Dreamweaver, you create an OLE DB connection by including a

Provider

parameter in a connection string. For

example, here are parameters for common OLE DB providers for Access, SQL Server, and Oracle databases, respec-
tively:

Provider=Microsoft.Jet.OLEDB.4.0;...

Provider=SQLOLEDB;...

Provider=OraOLEDB;...

For the parameter value of your OLE DB provider, see your provider vendor’s documentation, or consult your system
administrator.

About connection strings

A connection string combines all the information your web application needs to connect to a database. Dreamweaver
inserts this string in your page’s server-side scripts for later processing by your application server.

A connection string for Microsoft Access and SQL Server databases consists of a combination of the following
parameters separated by semicolons:

Provider

Specifies the OLE DB provider for your database. For example, here are parameters for common OLE DB

providers for Access, SQL Server, and Oracle databases, respectively:

Provider=Microsoft.Jet.OLEDB.4.0;...

Provider=SQLOLEDB;...

Provider=OraOLEDB;...

For the parameter value of your OLE DB provider, see your provider vendor’s documentation, or consult your system
administrator.

If you don’t include a Provider parameter, then the default OLE DB provider for ODBC is used and you must specify
an appropriate ODBC driver for your database.

Driver

Specifies the ODBC driver to use if you don’t specify an OLE DB provider for your database.

Server

Specifies the server hosting the SQL Server database if your web application runs on a different server.

Database

The name of a SQL Server database.

DBQ

The path to a file-based database such as one created in Microsoft Access. The path is the one on the server

hosting the database file.

UID

Specifies the user name.

PWD

Specifies the user password.

DSN

The data source name, if you use one. Depending on how you define the DSN on your server, you can omit the

connection string’s other parameters. For example,

DSN=Results

can be a valid connection string if you define the

other parameters when you create the DSN.

Connection strings for other kinds of databases may not use the parameters listed above, or will have different names
or uses for the parameters. For more information, see your database vendor’s documentation, or consult your system
administrator.

Here’s an example of a connection string that will create an ODBC connection to an Access database called
trees.mdb:

September 4, 2007