MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual page 341

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 18: Building Custom CFAPI Tags
Throws:
IndexOutOfBoundsException
See Also:
setData, addRow
addRow
public int addRow()
Adds a new row to the query. Call this method each time you want to append a row
to the query.
The following example demonstrates the addition of 2 rows to a query that has 3
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" ) ;
query.setData( iRow, iState, "MN" ) ;
query.setData( iRow, iZip, "55105" ) ;
Returns:
The index of the row that was appended to the query.
See Also:
setData, getData
setData
public void setData(int iRow,
Sets a data element within a row and column of the query. Row and column
indexes begin with 1. Before calling setData for a given row you should be sure to
call addRow and use the return value as the row index for your call to setData.
The following example demonstrates the addition of 2 rows to a query that has 3
columns ('City', 'State', and 'Zip'):
// Define column indexes
- If an invalid index is passed to the method.
int iCol,
String data)
throws IndexOutOfBoundsException
315

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents