Returns the index of the column, or 0 if no such column exists.
public int getColumnIndex(String name)
| Parameter | Description |
|---|---|
|
name |
Name of column to get index of (lookup is case-insensitive) |
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++ )
{
response.write( query.getData( iRow, iEMail ) + "<BR>" ) ;
}