Ccfxquery::getcolumns; Ccfxquery::getdata - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

CCFXQuery::GetColumns

Syntax
CCFXStringSet* CCFXQuery::GetColumns(void)
Description
Retrieves a list of the column names contained in a query.
Returns
Returns an object of
ColdFusion automatically frees the memory that is allocated for the returned string set, after the
request is completed.
Example
The following example gets the list of columns, then iterates over the list, writing each column
name back to the user:
// Get the list of columns from the query
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( " " ) ;
}

CCFXQuery::GetData

Syntax
LPCSTR CCFXQuery::GetData(int iRow, int iColumn)
Description
Gets a data element from a row and column of a query. Row and column indexes begin with 1.
You can determine the number of rows in a query by calling
determine the number of columns in a query by retrieving the list of columns using
CCFXQuery::GetColumns
set.
Returns
Returns the value of the requested data element.
Parameters
Parameter
iRow
iColumn
754
Chapter 4: ColdFusion C++ CFX Reference
CCFXStringSet class
, and then calling
Description
Row to retrieve data from (1-based)
Column to retrieve data from (1-based)
that contains a list of the columns in the query.
CCFXQuery::GetRowCount
CCFXStringSet::GetCount
. You can
on the returned string

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents