CCFXQuery* CCFXRequest::GetQuery(void)
Retrieves a query that was passed to a tag. To pass a query to a custom tag, you use the QUERY attribute. This attribute should be set to the name of a query (created using the cfquery tag or another custom tag). The QUERY attribute is optional and should be used only by tags that process an existing data set.
Returns an object of the CCFXQuery class that represents the query passed to the tag. If no query was passed to the tag, NULL is returned. The memory allocated for the returned query is freed automatically by ColdFusion after the request is completed.
The following example retrieves the query that was passed to the tag. If no query was passed, an exception is thrown:
CCFXQuery* pQuery = pRequest->GetQuery() ; if ( pQuery == NULL ) { pRequest->ThrowException( "Missing QUERY parameter", "You must pass a QUERY parameter in " "order for this tag to work correctly." ) ; }