ADO Connections

By: Tom Muck

Page 1 of 4

Set for printing

Next

Dreamweaver provides several methods for an ASP application to connect to a database:

  • Application server -- using DSN
  • Local machine -- using DSN
  • Application server -- using custom connection string (OLE DB or DSNLess)
  • Local machine -- using custom connection string (OLE DB or DSNLess)
  • Application server using Server.Mappath in a connection string (OLE DB or DSNLess)

The Local Machine settings allow you to connect on your local computer through the local machine, whereas the Testing Server settings allow you to connect through the application server that is set up in your Site Definition dialog box under the Testing Server tab. When you define the site for the first time, the URL Prefix has to be set up properly in order to for the database connections to work properly:

The URL Prefix
Figure 1  The URL Prefix

The URL Prefix can be your FTP host, an HTTP address, or a local network connection. It can even be your own local machine with a http://localhost/foldername URL Prefix.

Dreamweaver provides an interface for getting the connection string into your page. The interface is the Custom Connection String dialog box:

You can access this dialog box by clicking the Plus sign in the Databases panel, or the Define button on the Recordset, Command, Insert, Update, or Delete dialog boxes.

Accessing the Custom Connection String dialog box
Figure 2  Accessing the Custom Connection String dialog box

The following connection strings are some of the more popular ADO connection strings used in ASP applications. Please note that in the Connection dialogue box, the connection strings will be placed on one line in the Connection String textfield.

Page 1 of 4 1 2 3 4 Next


download
Download Support Files


Downloads are disabled during your trial period.


Keywords
DW, ADO, database connections