![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual Download Page 324](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369324.webp)
298
Developing Web Applications with ColdFusion
Retrieves the number of rows in the query. Returns the number of rows contained in
the query.
Example
The following example retrieves the number of rows in a query and writes it back to the
user:
CCFXQuery* pQuery = pRequest->GetQuery() ;
char buffOutput[256] ;
wsprintf( buffOutput,
"The number of rows in the query is %ld.",
pQuery->GetRowCount() ) ;
pRequest->Write( buffOutput ) ;
CCFXQuery::SetData
void CCFXQuery::SetData(int
iRow
, int
iColumn
, LPCSTR
lpszData
)
Sets a data element within a row and column of the query. Row and column indexes
begin with 1. Before calling
SetData
for a given row, you should be sure to call
CCFXQuery::AddRow
and use the return value as the row index for your call to
SetData
.
iRow
Row of data element to set (1-based).
lColumn
Column of data element to set (1-based).
lpszData
New value for data element.
Example
The following example demonstrates the addition of 2 rows to a query that has 3
columns (’City’, ’State’, and ’Zip’):
// First row
int iRow ;
iRow = pQuery->AddRow() ;
pQuery->SetData( iCity, iRow, "Minneapolis" ) ;
pQuery->SetData( iState, iRow, "MN" ) ;
pQuery->SetData( iZip, iRow, "55345" ) ;
// Second row
iRow = pQuery->AddRow() ;
pQuery->SetData( iCity, iRow, "St. Paul" ) ;
pQuery->SetData( iState, iRow, "MN" ) ;
pQuery->SetData( iZip, iRow, "55105" ) ;
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...