Query Interface; Methods; Addrow - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Query interface

public abstract interface Query
Interface to a query used or created by a custom tag. A query contains tabular data organized by
named columns and rows.

Methods

Returns
Method
int

addRow()

int
getColumnIndex(String name)
String[]
getColumns()
String
getData(int iRow, int iCol)
String
getName()
int
getRowCount()
void
setData(int iRow, int iCol,
String data)
addRow
Description
Adds a row to a query. Call this method to append a row to a query.
Returns the index of the row that was appended to the query.
Category
Query interface
Syntax
public int addRow()
See also
,
setData
getData
Example
The following example demonstrates the addition of two rows to a query that has three columns,
City, State, and Zip:
// Define column indexes
int iCity = 1, iState = 2, iZip = 3 ;
// First row
int iRow = query.addRow() ;
query.setData( iRow, iCity, "Minneapolis" ) ;
query.setData( iRow, iState, "MN" ) ;
query.setData( iRow, iZip, "55345" ) ;
// Second row
iRow = query.addRow() ;
query.setData( iRow, iCity, "St. Paul" ) ;
772
Chapter 5: ColdFusion Java CFX Reference
Description
Adds a row to the query
Gets the index of a column given its name
Gets a list of the column names in a query
Gets a data element from a row and column of a
query
Gets the name of a query
Gets the number of rows in a query
Sets a data element in a row and column of a
query

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents