User Guide
1062 Chapter 7: ColdFusion C++ CFX Reference
Example
The following example shows the addition of two rows to a three-column ('City', 'State', and
'Zip') query:
// 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" ) ;
CCFXRequest class
Abstract class that represents a request made to a ColdFusion Extension (CFX). An instance of
this class is passed to the main function of your extension DLL. The class provides interfaces that
can be used by the custom extension for the following actions:
• Reading and writing variables
• Returning output
• Creating and using queries
• Throwing exceptions
Class methods
virtual BOOL AttributeExists
( LPCSTR lpszName )
CCFXRequest::AttributeExists
checks
whether the attribute was passed to the
tag.
virtual LPCSTR GetAttribute
( LPCSTR lpszName )
CCFXRequest::GetAttribute
gets the
value of the passed attribute.
virtual CCFXStringSet* GetAttributeList()
CCFXRequest::GetAttributeList
gets an
array of attribute names passed to the
tag.
virtual CCFXQuery* GetQuery()
CCFXRequest::GetQuery
gets the query
that was passed to the tag.
virtual LPCSTR GetSetting( LPCSTR lpszSettingName )
CCFXRequest::GetSetting
This method is deprecated. It might not
work, and might cause an error, in later
releases.
virtual void Write( LPCSTR lpszOutput )
CCFXRequest::Write
writes text output
back to the user.










