Creating a database connection
The final step of the setup process is to create a connection to the database.
To create a database connection in Dreamweaver:
- Open any JSP page in Dreamweaver, and then open the Databases panel (Window > Databases).
- Click the Plus (+) button on the panel and select ODBC Database (Sun JDBC-ODBC Driver) from the pop-up menu.
The ODBC Database (Sun JDBC-ODBC Driver) dialog box appears.
- Enter connTownsend as the connection name.
- (Windows only) Do one of the following:
- If your server is on your local computer, select the Using Driver On This Machine option.
- If your server is on a remote system, select the Using Driver On Testing Server option.
Macintosh users can ignore this step because all database connections use drivers on the testing server.
- Replace the
[odbc dsn] placeholder in the URL text box with CafeTownsend.
The URL text box should look like this:
If youre using Dreamweaver on a Windows computer, during installation, Dreamweaver created a DSN called CafeTownsend pointing to the Microsoft Access database in the Dreamweaver application folder.
- Click Test.
Dreamweaver attempts to connect to the database. If the connection fails, do the following:
- Double-check the DSN and the other connection parameters.
- Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying where dynamic pages can be processed).
- Consult Troubleshooting Database Connections in Using Dreamweaver (Help > Using Dreamweaver).
- Click OK.
The new connection appears in the Databases panel.
The sample JSP application is now set up for the Getting Started with Dreamweaver tutorials. For more information, see Tutorial: Developing a Web Application.