home *** CD-ROM | disk | FTP | other *** search
- <!--- CFSTOREDPROC Example --->
- <HTML>
- <HEAD>
- <TITLE>
- CFSTOREDPROC Example
- </TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <H3>CFSTOREDPROC Function</H3>
-
- <P>The following view-only example executes a Sybase stored procedure
- 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.
- <P>See the View Example pane to view the code.
- <!--- 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 tags
- <CFPROCPARAM TYPE="IN"
- CFSQLTYPE=CF_SQL_INTEGER
- VALUE="1" DBVARNAME=@param1>
-
- <CFPROCPARAM TYPE="OUT" CFSQLTYPE=CF_SQL_DATE
- CFVARNAME=FOO DBVARNAME=@param2> --->
- <!--- Close the CFSTOREDPROC tag
- </CFSTOREDPROC> --->
- <!---
- <CFOUTPUT>
- The output param value: '#foo#'
- <br>
- </CFOUTPUT>
- <h3>The Results Information</h3>
- <CFOUTPUT QUERY = RS1>#NAME#,#DATE_COL#
- <br>
- </CFOUTPUT>
- <p>
- <CFOUTPUT>
- <hr>
- <p>Record Count: #RS1.RecordCount# >p>Columns: #RS1.ColumnList#
- <hr>
- </CFOUTPUT>
- <CFOUTPUT QUERY=RS3>#col1#,#col2#,#col3#
- <br>
- </CFOUTPUT>
- <p>
- <CFOUTPUT>
- <hr>
- <p>Record Count: #RS3.RecordCount# <p>Columns: #RS3.ColumnList#
- <hr>
- The return code for the stored procedure is: '#CFSTOREDPROC.STATUSCODE#'<br>
- </CFOUTPUT> --->
-
- </BODY>
- </HTML>