Specifications
The Database API 313
Example
//deletes a connection
function clickedDelete()
{
var selectedObj = dw.serverComponents.getSelectedNode();
if (selectedObj && selectedObj.objectType=="Connection")
{
var connRec = MMDB.getConnection(selectedObj.name);
if (connRec)
{
MMDB.deleteConnection(selectedObj.name);
dw.serverComponents.refresh();
}
}
}
MMDB.getColdFusionDsnList()
Availability
Dreamweaver UltraDev 4
Description
Gets the ColdFusion data source names (DSNs) from the site server, using the
getRdsUserName() and getRdsPassword() functions.
Arguments
None.
Returns
An array that contains the ColdFusion DSNs that are defined on the server for the current site.
MMDB.getConnection()
Availability
Dreamweaver UltraDev 4, enhanced in Dreamweaver MX
Description
Gets a named connection object. Connection objects contain the following properties:
Property Description
name Connection name
type Indicates, if useHTTP is false, which DLL to use for connecting to a database at runtime
string Runtime ADO connection string or JDBC URL
dsn ColdFusion DSN
driver Runtime JDBC Driver
username Runtime user name
password Runtime password
useHTTP String that contains either true or false, specifying whether to use a remote driver (HTTP
connection) at design time; otherwise, use a local driver (DLL)
includePattern Regular expression used to find the file include statement on the page during Live Data and
Preview In Browser