beautypg.com

Mmdb.getprimarykeys(), Mmdb.getprocedures() – Adobe Dreamweaver API Reference CS5 User Manual

Page 75

background image

70

DREAMWEAVER API REFERENCE

The database API

Last updated 8/27/2013

["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.

Returns
An array of procedure objects where each procedure object has the following set of three properties: