Specifications

337
CHAPTER 28
The Database Connectivity API
As a developer, you can create a new connection types and corresponding dialog boxes for new or
existing server models. However, when a user sets up a site to start building pages, he or she
creates a new connection object after selecting a particular type of connection that you created.
The user can select your new connection type in several ways:
On the Application Building panel, the user can click the plus (+) button and select Recordset.
In the Recordset dialog box, the user can expand the Connection list box.
On the Database tab of the Databases panel, the user can click plus (+) button and select Data
Source Name.
To develop a new connection type:
1 Create the layout for the connection dialog box.
Create an HTML file that lays out the user interface (UI) for your connection dialog box.
Name this file using the name of the connection (for example myConnection.htm). For
information on how to create a dialog box, see Adding Custom Server Behaviors in Book 8,
Making Pages Dynamic, in Getting Started with Dreamweaver MX.
Make sure this HTML file includes the JavaScript implementation file that you define in
Step Create a JavaScript file that implements at least the following elements: on page 338, as
shown in the following example:
<head>
<script SRC="../myConnectionImpl.js"></script>
</head>
Store this HTML file, which defines your connection dialog box, in the Configuration/
Connections/server-model/platform folder.
For example, the default ADO connection dialog box for an ASP JavaScript
document on a Windows platform is stored in the ASP_Js/Win folder and is named
Connection_ado_conn_string.htm.
server-model is the folder that is associated with the document type (such as asp_js) of the currently
open page.
platform
is either Win or Mac.