Description
This function returns an array of objects that describe the columns in the specified table.
Arguments
connName, tableName
The
argument is the connection name. This value identifies the connection
connName
containing the string that Dreamweaver should use to make a database connection to a
live data source.
The
argument is the table to query.
tableName
Returns
An array of objects, one object for each column. Each object defines the following three
properties for the column with which it is associated.
Property Name
name
datatype
definedsize
nullable
Example
The following example uses
var columnNameObjs = MMDB.getColumns(connName,tableName);
var databaseType
for (i = 0; i < columnNameObjs.length; i++)
{
var columnObj = columnNameObjs[i];
var columnName = columnObj.name;
var typename = columnObj.datatype;
if (dwscripts.isNumber(typename))
{
// it already is a num
typename = dwscripts.getDBColumnTypeAsString(typename,
databaseType);
}
var tooltiptext = typename;
}
88
The Database API
Description
Name of the column (for example,
Data type of the column (for example,
Defined size of the column (for example,
Indicates whether the column can contain
MMDB.getColumns()
= MMDB.getDatabaseType(connName);
)
price
small money
)
8
null
to set the tooltip text value:
)
values
Need help?
Do you have a question about the DREAMWEAVER 8-DREAMWEAVER API and is the answer not in the manual?