Dreamweaver CS4 Resources
|
Create a connection using a local DSN
Note: This section assumes you have set up an
ASP application. It also assumes a database is set up on your local
computer or on a system to which you have network or FTP access.
You
can use a data source name (DSN) to create an ODBC connection between your
web application and your database. A DSN is a name containing all
the parameters needed to connect to a specific database using an
ODBC driver.
Because you can only specify an ODBC driver in
a DSN, you must use a connection string if you want to use an OLE
DB provider.
You can use a locally defined DSN to create a
database connection in Dreamweaver.
- Define a DSN on the Windows computer running Dreamweaver.
For instructions, see the following articles on the Microsoft
website:
- Open an ASP page in Dreamweaver,
and then open the Databases panel (Window > Databases).
- Click the Plus (+) button on the panel and select Data
Source Name (DSN) from the menu.
- Enter a name for the new connection, without spaces or
special characters.
- Select the Using Local DSN option and choose the DSN
you want to use from the Data Source Name (DSN) menu.
If you want to use a local DSN but haven’t defined one
yet, click Define to open the Windows ODBC Data Source Administrator.
- Complete the User Name and Password boxes.
- You can restrict the number of database items Dreamweaver retrieves at design time by clicking
Advanced, and entering a schema or catalog name.
Note: You cannot create a schema or catalog in Microsoft Access.
- Click Test to connect to the database, and then click
OK. If the connection fails, double‑check the connection string
or check the settings for the test folder Dreamweaver uses
to process dynamic pages.
|