Database connection functions, Mmdb.deleteconnection() – Adobe Dreamweaver API Reference CS5 User Manual
Page 60
55
DREAMWEAVER API REFERENCE
The database API
Last updated 8/27/2013
Database connection functions
Database connection functions let you make and manage any connection, including the Dreamweaver-provided ADO,
ColdFusion, and JDBC connections.
These functions interface with the Connection Manager only; they do not access a database. For functions that access
a database, see “
In managing database connections, you can get the user name and password to perform activities including:
•
Making a connection to a database
•
Opening a database connection dialog box
MMDB.deleteConnection()
Availability
Dreamweaver MX.
Description
This function deletes the named database connection.
Arguments
connName
•
The connName argument is the name of the database connection as it is specified in the Connection Manager. This
argument identifies, by name, the database connection to delete.
Returns
Nothing.
Example
The following example deletes a database 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();
}
}
}