Output Stored Procedure


/ Published in: ColdFusion
Save to your folder(s)



Copy this code and paste it in your HTML
  1.  
  2. -- This gets the data set using the CFStoredProc tag
  3. <cfstoredProc datasource="#application.dsn.acw#" procedure="dbo.PrcVisitorsRequestInformationUpdate">
  4. <cfprocresult name="procReturn" >
  5. <cfprocparam dbvarname="firstName" value="#show.firstName#">
  6. <cfprocparam dbvarname="lastName" value="#show.Firstname#">
  7. <cfprocparam dbvarname="dayTelephone" value="#show.phoneNumber#">
  8. <cfprocparam dbvarname="postalcode" value="#show.zipCode#">
  9. <cfprocparam dbvarname="emailAddress" value="#show.Email#">
  10. <cfprocparam dbvarname="comments" value="#show.comment#">
  11. <cfprocparam dbvarname="postalcode" value="#show.zipCode#">
  12. <cfprocparam dbvarname="source" value="#session.siteName#">
  13. </cfstoredProc>
  14.  
  15. -- This retrieves the the data set using CFQuery. remember it is important to parameterize any variables you pass int.
  16. <cfquery name="executeStoredProc" datasource="#application.dsn.acw#">
  17. exec [dbo].[PrcVisitorsRequestInformationUpdate] '', 'TEST', 'test', '[email protected]', '5555555555', '123 Test St.', 'Memphis', 'TN', '38701', 'NotClayton', 'Comments', 'NOT Web'
  18. </cfquery>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.