Query Interface
query.setData( iRow, iState, "MN" ) ;
query.setData( iRow, iZip, "55105" ) ;
getColumnIndex
Returns the index of the column, or -1 if no such column exists.
Description
Category
Query Interface
public int getColumnIndex(String name)
Syntax
See also
getColumns
Parameters
Parameter
name
Example
The following example retrieves the index of the EMAIL column and uses it to output
a list of the addresses contained in the column:
// Get the index of the EMAIL column
int iEMail = query.getColumnIndex( "EMAIL" ) ;
// Iterate over the query and output list of addresses
int nRows = query.getRowCount() ;
for( int iRow = 1; iRow <= nRows; iRow++ )
{
}
getColumns
Description
Returns an array of strings containing the names of the columns in the query.
Category
Query Interface
public String[] getColumns()
Syntax
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++ )
{
}
,
getData
Description
Name of column to get index of (lookup is case insensitive)
response.write( query.getData( iRow, iEMail ) + "<BR>" ) ;
response.write( columns[i] + " " ) ;
671
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?
Questions and answers