MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Spécifications Page 326

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 692
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 325
Chapter 27326
Example
The code var columnArray = MMDB.getColumnList("EmpDB","Select * from
Employees")
returns the following array of strings:
columnArray[0] = "EmpName"
columnArray[1] = "EmpFirstName"
columnArray[2] = "Age"
MMDB.getColumns()
Availability
Dreamweaver MX
Description
Executes the specified SQL statement and, regardless of whether any rows are returned, returns an
array of objects that describe the columns that are specified in the SQL statement. When
MMDB.getColumns( ) executes a SELECT statement, the returned rows are parsed to build the
JavaScript data object list.
Arguments
connName, sqlStatement
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.
sqlStatement is the SQL statement that MMDB.getColumns( ) executes.
Returns
An array of column objects, one object for each column. Each object defines the following three
properties for the column with which it is associated.
Example
var connName = componentRec.parent.parent.parent.name;
var sqlstatement = "select * from " + tableName + " where 1=0";
var columnNameObjs = MMDB.getColumns(connName,sqlstatement);
var columnName = columnNameObjs[i];
var tooltiptext = columnName.datatype;
tooltiptext+=" ";
tooltiptext+=columnName.definedsize;
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)
Vue de la page 325
1 2 ... 321 322 323 324 325 326 327 328 329 330 331 ... 691 692

Commentaires sur ces manuels

Pas de commentaire