BackUp LevelNext

CCFXQuery::GetColumns

CCFXStringSet* CCFXQuery::GetColumns(void)

Retrieves a list of the column names contained in the query.

Returns an object of class CCFXStringSet which contains a list of the columns contained in the query. You are not responsible for freeing the memory allocated for the returned string set (it will be automatically freed by ColdFusion after the request is completed).

Example

The following example retrieves the list of columns and then iterates over the list, writing each column name back to the user.

// Get the list of columns from the quer

CCFXStringSet* pColumns = pQuery->GetColumns() ;
int nNumColumns = pColumns->GetCount() ;
 
// Print the list of columns to the user
pRequest->Write( "Columns in query: " ) ;
for( int i=1; i<=nNumColumns; i++ )
{
    pRequest->Write( pColumns->GetString( i ) ) ;
    pRequest->Write( " " ) ;
}


BackUp LevelNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.