User Guide

94 Chapter 7: The Database API
Example
The statement MMDB.getColumnsOfTable ("EmpDB","Employees"); returns the
following strings:
["EmpID", "FirstName", "LastName"]
MMDB.getPrimaryKeys()
Availability
Dreamweaver MX.
Description
This function returns the column names that combine to form the primary key of the named
table. A primary key serves as the unique identifier for a database row and consists of at least one
column.
Arguments
connName
, tableName
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 tableName argument is the name of the table for which you want to retrieve the set of
columns that comprises the primary key of that table.
Returns
An array of strings. The array contains one string for each column that comprises the primary key.
Example
The following example returns the primary key for the specified table.
var connName = componentRec.parent.parent.parent.name;
var tableName = componentRec.name;
var primaryKeys = MMDB.getPrimaryKeys(connName,tableName);
MMDB.getProcedures()
Availability
Dreamweaver MX.
Description
This function returns an array of procedure objects that are associated with a named connection.
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.
000_DW_API_Print.book Page 94 Wednesday, August 20, 2003 9:14 AM