The final step of the setup process is to create a connection to the database.
- Open any ASP.NET page in Dreamweaver, and then open the Databases panel (Window > Databases).
- Click the Plus (+) button in the Databases panel and select OLE DB Connection from the pop-up menu.
The OLE DB Connection dialog box appears.
- Enter connTownsend as the connection name.
- Click the Templates button.
The Connection String Template dialog box appears.
- From the list of templates, select Microsoft Access 2000 (Microsoft Jet 4.0 Provider) and click OK.
Dreamweaver adds a connection string template in the OLE DB Connection dialog box. The template contains placeholders for missing information in the connection string.
- In the Data Source text box, enter the full path to the sample database file on your hard disk or the remote computers hard disk. If ASP.NET is running on your local computer and you installed Dreamweaver to its default location, use the following path:
C:\Program Files\Macromedia\Dreamweaver 8\Tutorial_assets\data\tutorial.mdb
The path may vary depending on where you installed Dreamweaver.
For example, you might enter this path as the value of Data Source for a database on your local hard disk:
Data Source=C:\Program Files\Macromedia\Dreamweaver 8\Tutorial_assets\data\tutorial.mdb;
Or you might enter this path for a database on a remote server:
- Delete the User ID and the Password lines.
The Access database does not require a user ID or password.
- Click Test.
Dreamweaver attempts to connect to the database. If the connection fails, do the following:
- Double-check the path to the database.
- Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying where dynamic pages can be processed).
- Deploy the supporting files by selecting Site > Advanced > Deploy Supporting Files.
- Consult Troubleshooting Database Connections in Using Dreamweaver (Help > Using Dreamweaver).
- Click OK.
The new connection appears in the Databases panel.