Specifications

Chapter 27324
MMDB.testConnection()
Availability
Dreamweaver UltraDev 4
Description
Tests connection settings. Displays a modal dialog box that describes the results.
Arguments
This function expects a single argumentan Array object that contains values from the following
list, which are appropriate for the current server model. For properties that do not apply to the
connection being tested, set them to empty (
““).
type indicates, when useHTTP is false, which DLL to use for connecting to a database at
design time. Used to test connection settings.
string is the ADO connection string or JDBC URL.
dsn is the Data Source Name.
driver is the JDBC driver.
username is the user name.
password is the password.
useHTTP is a Boolean value. A value of true specifies that Dreamweaver should use an HTTP
connection at design time; otherwise, Dreamweaver uses a DLL.
Returns
A Boolean value. If the connection test is successful, testConnection() returns true;
false otherwise.
Database access functions
Database access functions let you query a database. For the collection of functions that manage a
database connection, see Database connection functions on page 312.
The following list describes some of the arguments that are common to the functions that are
available:
Most database access functions use a connection name as an argument. You can see a list of
valid connection names in the Connection Manager, or you can use
MMDB.getConnectionList() to get a list of all the connection names programmatically.
Stored procedures often require parameters. There are two ways of specifying parameter values
for database access functions. First, you can provide an array of parameter values
(
paramValuesArray). If you specify only parameter values, the values need to be in the
sequence in which the stored procedure requires the parameters. Second, you specify
parameter values to provide an array of parameter names (
paramNameArray). (You can use the
MMDB.getSPParamsAsString() function to get the parameters of the stored procedure.) If
you provide parameter names, the values that are specified in
paramValuesArray need to be in
the sequence in which the parameter names are specified in
paramNameArray.