User Guide

Query interface 775
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()
Example
The following example retrieves the number of rows in a query and writes it back to the user:
Query query = request.getQuery() ;
int rows = query.getRowCount() ;
response.write( "The number of rows in the query is "
+ Integer.toString(rows) ) ;
setData
Description
Sets a data element in a row and column of a query. Row and column indexes begin with 1.
Before calling
setData for a given row, call addRow and use the return value as the row index for
your call to
setData.
Category
Query interface
Syntax
public void setData(int iRow, int iCol, String data)
Throws
IndexOutOfBoundsException
If an invalid index is passed to the method.