Specifications

The Database API 327
MMDB.getColumnsOfTable()
Availability
Dreamweaver UltraDev 1
Description
Gets a list of all the columns in the specified table.
Arguments
connName, tableName
connName 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.
tableName is the name of a table in the database that is specified by connName.
Returns
An array of strings where each string is the name of a column in the table.
Example
The statement MMDB.getColumnsOfTable ("EmpDB","Employees"); returns the
following strings:
["EmpID", "FirstName", "LastName"]
MMDB.getPrimaryKeys()
Availability
Dreamweaver MX
Description
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
connName 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.
tableName 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
var connName = componentRec.parent.parent.parent.name;
var tableName = componentRec.name;
var primaryKeys = MMDB.getPrimaryKeys(connName,tableName);