Contents > CFML Reference > ColdFusion Java CFX Reference > Query interface > addRow PreviousNext

addRow

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.

Query interface

public int addRow()

setData, getData

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" ) ;
query.setData( iRow, iState, "MN" ) ;
query.setData( iRow, iZip, "55105" ) ; 

Contents > CFML Reference > ColdFusion Java CFX Reference > Query interface > addRow PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/cfxrefa8.htm