Specifications

The Database Connectivity API 341
inspectConnection()
Availability
Dreamweaver UltraDev 4
Description
Dreamweaver calls this function, when the user edits an existing connection, to initialize the
dialog box data for defining a connection. In this way, Dreamweaver can populate the dialog box
with the appropriate connection information.
Argument
parameters
parameters is the same object that findConnection() returns.
Returns
Nothing.
applyConnection()
Availability
Dreamweaver UltraDev 4
Description
Dreamweaver calls this function when the user clicks OK in the connection dialog box. The
applyConnection() function generates the HTML source for a connection. Dreamweaver
writes the HTML to the Configuration/Connections/connection-name.ext include file, where
connection-name is the name of your connection (see Step Create the layout for the connection
dialog box. on page 337), and ext is the default extension that is associated with the server model.
Arguments
None.
Returns
The HTML source for a connection. Dreamweaver also closes the connection dialog box. If a
field validation error occurs,
applyConnection() displays an error message and returns an empty
string to indicate that the dialog box should remain open.
The generated include file
The include file that applyConnection() generates declares all the properties of a connection.
The filename for the include file is the connection name that has the file extension defined for the
server model that is associated with the current site.
Note: Connections are shared, so set the allowMultiple value to false. This ensures that the connection file is
included in the document only once and that the server script remains in the page if any other server behaviors use it.
The following sections illustrate some sample include files that applyConnection() generates for
various default server models.
Note: To create a new connection include file format, you need to define a new .edml mapping file, which should be
similar to connection_includefile.edml, as shown in “The definition file for your connection type” on page 343.