Adobe Dreamweaver API Reference CS5 Uživatelský manuál Strana 74

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 533
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 73
69
DREAMWEAVER API REFERENCE
The database API
Last updated 8/27/2013
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.
Example
The following example uses MMDB.getColumns() to set the tooltip text value:
var columnNameObjs = MMDB.getColumns(connName,tableName);
var databaseType = MMDB.getDatabaseType(connName);
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;
}
MMDB.getColumnsOfTable()
Availability
Dreamweaver UltraDev 1.
Description
This function gets a list of all the columns in the specified table.
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 a table in the database that is specified by the connName argument.
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:
Property Name Description
name Name of the column (for example, price)
datatype Data type of the column (for example, small money)
definedsize Defined size of the column (for example, 8)
nullable Indicates whether the column can contain null values
Zobrazit stránku 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 532 533

Komentáře k této Příručce

Žádné komentáře