User Guide

Query interface 1079
getColumns
Description
Returns an array of strings containing the names of the columns in the query.
Category
Query interface
Syntax
public String[] getColumns()
Example
The following example retrieves the array of columns, then iterates over the list, writing each
column name back to the user:
// Get the list of columns from the query
String[] columns = query.getColumns() ;
int nNumColumns = columns.length ;
// Print the list of columns to the user
response.write( "Columns in query: " ) ;
for( int i=0; i<nNumColumns; i++ )
{
response.write( columns[i] + " " ) ;
}
getData
Description
Retrieves a data element from a row and column of a query. Row and column indexes begin
with 1. You can find the number of rows in a query by calling
getRowCount. You can find the
number of columns in a query by calling
getColumns.
Returns the value of the requested data element.
Category
Query interface
Syntax
public String getData(int iRow, int iCol)
Throws
IndexOutOfBoundsException
If an invalid index is passed to the method.
See also
setData, addRow