User Guide

86 The Database API
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 70.
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 the
MMDB.getConnectionList() function 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 you specify in
paramValuesArray must be in the sequence of the parameter names that you specify in
paramNameArray.
MMDB.getColumnAndTypeList()
Availability
Dreamweaver UltraDev 1.
Description
This function gets a list of columns and their types from an executed SQL SELECT statement.
Arguments
connName, statement
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.
The statement argument is the SQL SELECT statement to execute.
Returns
An array of strings that represents a list of columns (and their types) that match the SELECT
statement, or an error if the SQL statement is invalid or the connection cannot be made.
000_DW_API_Print.book Page 86 Wednesday, July 20, 2005 11:58 AM