User Guide

1080 Chapter 8: ColdFusion Java CFX Reference
Parameters
Example
The following example iterates over the rows of a query and writes the data back to the user in a
simple, space-delimited format:
int iRow, iCol ;
int nNumCols = query.getColumns().length ;
int nNumRows = query.getRowCount() ;
for ( iRow = 1; iRow <= nNumRows; iRow++ )
{
for ( iCol = 1; iCol <= nNumCols; iCol++ )
{
response.write( query.getData( iRow, iCol ) + " " ) ;
}
response.write( "<BR>" ) ;
}
getName
Description
Returns the name of a query.
Category
Query interface
Syntax
public String getName()
Example
The following example retrieves the name of a query and writes it back to the user:
Query query = request.getQuery() ;
response.write( "The query name is: " + query.getName() ) ;
getRowCount
Description
Retrieves the number of rows in a query.
Returns the number of rows contained in a query.
Category
Query interface
Syntax
public int getRowCount()
Parameter Description
iRow Row to retrieve data from (1-based)
iCol Column to retrieve data from (1-based)