beautypg.com

Mmdb.getruntimeconnectiontype(), Mmdb.getusername() – Adobe Dreamweaver API Reference CS5 User Manual

Page 66

background image

61

DREAMWEAVER API REFERENCE

The database API

Last updated 8/27/2013

Description
This function gets the ODBC DSNs from the site server. The

getRDSUserName()

and

getRDSPassword()

functions

are used when the server model of the current site is ColdFusion. This function provides an option for a developer to
specify a URL parameter string to be appended to the Remote Connectivity URL that

MMDB.getRemoteDsnList()

generates. If the developer provides a parameter string, this function passes it to the HTTP connectivity scripts.

Arguments
{urlParams}

The urlParams argument, which is optional, is a string that contains a list of name

=value

expressions, which are

separated by ampersand (&) characters. You must not enclose values with quotes. Some characters, such as the
space in the value

Hello World

, need to be encoded. The following example shows a valid sample argument that

you can pass to

MMDB.getRemoteDsnList()

: a=1&b=Hello%20World

Returns
Returns an array that contains the ODBC DSNs that are defined on the server for the current site.

MMDB.getRuntimeConnectionType()

Availability
Dreamweaver UltraDev 1.

Description
This function returns the runtime connection type of the specified connection name.

Arguments
connName

The connName argument is a connection name that is specified in the Connection Manager. It identifies the
connection string that Dreamweaver should use to make a database connection to a live data source.

Returns
A string that corresponds to the connection type. This function can return one of the following values:

"ADO"

,

"ADODSN"

,

"JDBC"

, or

"CFDSN"

.

Example
The following code returns the string

"ADO"

for an ADO connection:

var connectionType = MMDB.getRuntimeConnectionType ("EmpDB")

MMDB.getUserName()

Availability
Dreamweaver UltraDev 1.

Description
This function returns a user name for the specified connection.