103
CHAPTER 8
The Database Connectivity API
As a developer, you can create new connection types and corresponding dialog boxes for new or
existing server models for Macromedia Dreamweaver MX 2004. Then, when a user sets up a site
to start building pages, he or she creates a new connection object after selecting the particular type
of connection that you created.
The user can select your new connection type in the following ways:
•
On the Application 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 the Plus (+) button and select
Data Source Name.
How to develop a new connection type
The following steps outline the process for creating 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 about creating a dialog box, see
Getting Started with Dreamweaver
.
Make sure this HTML file includes a reference to the JavaScript implementation file that you
define in Step 2,
“Create a JavaScript file that implements at least the following elements:”
on page 104
, 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 (where the
platform
is either Windows or
Macintosh).
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.
Note:
At runtime, Macromedia Dreamweaver dynamically builds the list of connection types that
are available to the user from the collection of dialog boxes that are in the ASP_Js/Win folder.
000_DW_API_Print.book Page 103 Wednesday, August 20, 2003 9:14 AM
Содержание DREAMWEAVER MX 2004-DREAMWEAVER API
Страница 1: ...Dreamweaver API Reference...
Страница 24: ...24 Contents...
Страница 32: ......
Страница 70: ...70 Chapter 5 Fireworks Integration...
Страница 76: ...76 Chapter 6 Flash Integration...
Страница 116: ...116 Chapter 9 The JavaBeans API...
Страница 140: ......
Страница 152: ...152 Chapter 11 Application...
Страница 218: ...218 Chapter 12 Workspace...
Страница 248: ...248 Chapter 13 Site...
Страница 292: ...292 Chapter 14 Document...
Страница 378: ...378 Chapter 17 Design...
Страница 430: ...430 Chapter 18 Code...
Страница 486: ...486 Index...