<cfstoredproc>

Executes stored procedures by an ODBC or native connection to a server database. It specifies database connection information and identifies the stored procedure.

This tag may have a body.

This tag is also supported within <cfscript>

Attribute Description
cachedafter
datetime, optional

This is the age of which the query data can be

cachename
string, optional

This attribute has been deprecated and is non-functional.

password
string, optional

If specified, password overrides the password value specified in the data source setup.

returncode
boolean, optional

Yes or No. Specifies whether the tag populates cfstoredproc.statusCode with the status code returned by the stored procedure. Default is No.

procedure
string, required

The name of the stored procedure on the database server.

timeout
number, optional

timeout for the stored procedure.

debug
boolean, optional

Yes or No. Specifies whether debug info will be listed on each statement. Default is No.

datasource
string, optional

The name data source that points to the database that contains the stored procedure.

result
string, optional

Specifies a name for the structure in which cfstoredproc returns the statusCode and ExecutionTime variables.

blockfactor
number, optional

Specifies the maximum number of rows to fetch at a time from the server. The range is 1 which is the default to 100. The ODBC driver may dynamically reduce the block factor at runtime.

username
string, optional

If specified, username overrides the username value specified in the data source setup.

cachedwithin
object, optional

possible values are: String "request": If original query was created within the current request, cached query data isused. a timespan (created with function CreateTimeSpan): If original query date falls within the time span, cached query data isused.

To use cached data, the current query must use the same SQL statement, data source, query name, user name, and password.

<cfstoredproc
    [cachedafter=datetime]
    [cachename=string]
    [password=string]
    [returncode=boolean]
    procedure=string
    [timeout=number]
    [debug=boolean]
    [datasource=string]
    [result=string]
    [blockfactor=number]
    [username=string]
    [cachedwithin=object]
><!--- body --->[</cfstoredproc>]

Examples

There are currently no examples for this tag.

See also