Chapter 1: ColdFusion Tags
CFPROCRESULT
The CFPROCRESULT tag is nested within a
parameter specifies a result set name that other ColdFusion tags, such as CFOUTPUT
and CFTABLE, use to access the result set. It also allows you to optionally identify
which of the stored procedure's result sets to return.
Syntax
<CFPROCRESULT NAME="query_name"
RESULTSET="1-n"
MAXROWS="maxrows">
NAME
Required. Name for the query result set.
RESULTSET
Optional. Specify this parameter to identify the desired result set if the stored
procedure returns multiple result sets. Default is 1.
MAXROWS
Optional. Specifies the maximum number of rows returned in the result set. The
default is to return all rows in the result set.
Usage
Specify one or more CFPROCRESULT tags to enable access to data returned by the
stored procedure.
RESULTSET must be unique within the scope of the CFSTOREDPROC tag. If you
specify the same result set twice, the second occurrence overwrites the first.
Example
...
<!--- The following example executes a Sybase stored procedure
<!--- CFSTOREDPROC tag --->
<CFSTOREDPROC PROCEDURE="foo_proc"
DATASOURCE="MY_SYBASE_TEST"USERNAME="sa"
PASSWORD=""DBSERVER="scup"DBNAME="pubs2"
RETURNCODE="YES"DEBUG>
<!--- CFPROCRESULT tags --->
<CFPROCRESULT NAME = RS1>
<CFPROCRESULT NAME = RS3 RESULTSET = 3>
<!---
<CFPROCPARAM TYPE="IN"
CFSQLTYPE=CF_SQL_INTEGER
<CFPROCPARAM TYPE="OUT"CFSQLTYPE=CF_SQL_DATE
VARIABLE=FOO DBVARNAME=@param2>
<!--- Close the CFSTOREDPROC tag --->
that returns three result sets, two of which we want. The
stored procedure returns the status code and one output
parameter, which we display. We use named notation
for the parameters. --->
CFPROCPARAM tags --->
VALUE="1"DBVARNAME=@param1>
CFSTOREDPROC
tag. This tag's NAME
163
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers