![]() ![]() ![]() |
LPCSTR CCFXQuery::GetData(int iRow, int lColumn)
Retrieves a data element from a row and column of the query. Row and column indexes begin with 1. You can determine the number of rows in the query by calling GetRowCount. You can determine the number of columns in the query by retrieving the list of columns using GetColumns and then calling CCFXStringSet::GetCount on the returned string set.
Returns the value of the requested data element.
Row to retrieve data from (1-based).
Column to retrieve data from (1-based).
The following example iterates over the elements of a query and writes the data in the query back to the user in a simple, space-delimited format:
int iRow, iCol ; int nNumCols = pQuery->GetColumns()->GetCount() ; int nNumRows = pQuery->GetRowCount() ; for ( iRow=1; iRow<=nNumRows; iRow++ ) { for ( iCol=1; iCol<=nNumCols; iCol++ ) { pRequest->Write( pQuery->GetData( iRow, iCol ) ) ; pRequest->Write( " " ) ; } pRequest->Write( "<BR>" ) ; }
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.