The CFSTOREDPROC tag wraps SQL call parameters in tag attributes to simplify the process of retrieving data and to add functions not available in a CFQUERY call statement. It supports both ODBC and native data sources.
CFSTOREDPROC is used to identify the stored procedure and its data source and to set options. Two additional tags are nested within it:
- CFPROCPARAM -- Set the data and procedure types, variables and values, and other options
- CFPROCRESULT -- Identifies the result set for output and optionally limits the result set if multiple sets are returned by the stored procedure
Before deciding which of the two stored procedure methods to employ, answer these questions:
Do I need to specify input/output parameters for the query?
Do I need to return a result code for the query?
Do I need to select from multiple result sets in a stored procedure?
If you answer Yes to all three of these questions, you should be using CFSTOREDPROC in your applications.
|