home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cfstoredproc.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.5 KB  |  62 lines

  1. <!--- CFSTOREDPROC Example --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. CFSTOREDPROC Example
  6. </TITLE>
  7. </HEAD>
  8.  
  9. <BODY bgcolor=silver>
  10. <H3>CFSTOREDPROC Function</H3>
  11.  
  12. <P>The following view-only example executes a Sybase stored procedure
  13. that returns three result sets, two of which we want. The
  14. stored procedure returns the status code and one output
  15. parameter, which we display. We use named notation
  16. for the parameters.
  17. <P>See the View Example pane to view the code.
  18. <!--- CFSTOREDPROC tag 
  19. <CFSTOREDPROC PROCEDURE="foo_proc"
  20.     DATASOURCE="MY_SYBASE_TEST"    USERNAME="sa"
  21.     PASSWORD=""    DBSERVER="scup"    DBNAME="pubs2"
  22.     RETURNCODE="YES" DEBUG>  --->
  23. <!--- CFPROCRESULT tags 
  24. <CFPROCRESULT NAME = RS1>
  25. <CFPROCRESULT NAME = RS3 RESULTSET = 3>  --->
  26. <!---  CFPROCPARAM tags 
  27. <CFPROCPARAM TYPE="IN"
  28.     CFSQLTYPE=CF_SQL_INTEGER
  29.         VALUE="1"    DBVARNAME=@param1>
  30.         
  31. <CFPROCPARAM TYPE="OUT"    CFSQLTYPE=CF_SQL_DATE
  32.     CFVARNAME=FOO    DBVARNAME=@param2>  --->
  33. <!--- Close the CFSTOREDPROC tag 
  34. </CFSTOREDPROC>  --->
  35. <!---
  36. <CFOUTPUT>
  37. The output param value: '#foo#'
  38. <br>
  39. </CFOUTPUT>
  40. <h3>The Results Information</h3>
  41. <CFOUTPUT QUERY = RS1>#NAME#,#DATE_COL#
  42. <br>
  43. </CFOUTPUT>
  44. <p>
  45. <CFOUTPUT>
  46. <hr>
  47. <p>Record Count: #RS1.RecordCount# >p>Columns: #RS1.ColumnList#
  48. <hr>
  49. </CFOUTPUT> 
  50. <CFOUTPUT QUERY=RS3>#col1#,#col2#,#col3#
  51. <br>
  52. </CFOUTPUT>
  53. <p>
  54. <CFOUTPUT>
  55. <hr>
  56. <p>Record Count: #RS3.RecordCount# <p>Columns: #RS3.ColumnList#
  57. <hr>
  58. The return code for the stored procedure is: '#CFSTOREDPROC.STATUSCODE#'<br>
  59. </CFOUTPUT>  --->
  60.  
  61. </BODY>
  62. </HTML>