Chapter 1: ColdFusion Tags
MAXLENGTH
Optional. Maximum length of the parameter.
SCALE
Optional. Number of decimal places of the parameter.
NULL
Optional. Specify Yes or No. Indicates whether the parameter is passed as a NULL.
If you specify Yes, the tag ignores the VALUE attribute.
Usage
Use this tag to identify stored procedure parameters and their data type. Code one
CFPROCPARAM tag for each parameter. The parameters you code vary, based on
parameter type and DBMS. Additionally, the order in which you code CFPROCPARAM
tags matters, depending on whether the stored procedure was coded using positional
notation or named notation:
Positional notation — Order is very important if the stored procedure was
defined using positional notation. ColdFusion passes these parameters to the
stored procedure in the order in which they are defined.
Named notation — If named notation is used, the DBVarName for the
parameter must correspond to the variable name in the stored procedure on
the server.
Output variables will be scoped with the name of the VARIABLE attribute that was
passed to the tag.
Example
...
<!--- The following view-only 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 --->
</CFSTOREDPROC>
<CFOUTPUT>
The output param value: '#foo#'
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>
161
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