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

  1. <!--- CFPROCRESULT Example --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. CFPROCRESULT Example
  6. </TITLE>
  7. </HEAD>
  8.  
  9. <BODY bgcolor=silver>
  10. <H3>CFPROCRESULT Function</H3>
  11.  
  12. <P>The following 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. <!--- CFSTOREDPROC tag 
  18. <CFSTOREDPROC PROCEDURE="foo_proc"
  19.     DATASOURCE="MY_SYBASE_TEST"    USERNAME="sa"
  20.     PASSWORD=""    DBSERVER="scup"    DBNAME="pubs2"
  21.     RETURNCODE="YES" DEBUG>  --->
  22. <!--- CFPROCRESULT tags 
  23. <CFPROCRESULT NAME = RS1>
  24. <CFPROCRESULT NAME = RS3 RESULTSET = 3> --->
  25. <!---  CFPROCPARAM tags 
  26. <CFPROCPARAM TYPE="IN"
  27.     CFSQLTYPE=CF_SQL_INTEGER
  28.         VALUE="1"    DBVARNAME=@param1>
  29.         
  30. <CFPROCPARAM TYPE="OUT"    CFSQLTYPE=CF_SQL_DATE
  31.     CFVARNAME=FOO    DBVARNAME=@param2> --->
  32. <!--- Close the CFSTOREDPROC tag 
  33. </CFSTOREDPROC>  --->
  34. <!---
  35. <CFOUTPUT>
  36. The output param value: '#foo#'
  37. <br>
  38. </CFOUTPUT>
  39. <h3>The Results Information</h3>
  40. <CFOUTPUT QUERY = RS1>#NAME#,#DATE_COL#
  41. <br>
  42. </CFOUTPUT>
  43. <p>
  44. <CFOUTPUT>
  45. <hr>
  46. <p>Record Count: #RS1.RecordCount# >p>Columns: #RS1.ColumnList#
  47. <hr>
  48. </CFOUTPUT> 
  49. <CFOUTPUT QUERY=RS3>#col1#,#col2#,#col3#
  50. <br>
  51. </CFOUTPUT>
  52. <p>
  53. <CFOUTPUT>
  54. <hr>
  55. <p>Record Count: #RS3.RecordCount# <p>Columns: #RS3.ColumnList#
  56. <hr>
  57. The return code for the stored procedure is: '#CFSTOREDPROC.STATUSCODE#'<br>
  58. </CFOUTPUT>
  59. --->
  60.  
  61. </BODY>
  62. </HTML>