/ Published in: ColdFusion
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
-- This gets the data set using the CFStoredProc tag <cfstoredProc datasource="#application.dsn.acw#" procedure="dbo.PrcVisitorsRequestInformationUpdate"> <cfprocresult name="procReturn" > <cfprocparam dbvarname="firstName" value="#show.firstName#"> <cfprocparam dbvarname="lastName" value="#show.Firstname#"> <cfprocparam dbvarname="dayTelephone" value="#show.phoneNumber#"> <cfprocparam dbvarname="postalcode" value="#show.zipCode#"> <cfprocparam dbvarname="emailAddress" value="#show.Email#"> <cfprocparam dbvarname="comments" value="#show.comment#"> <cfprocparam dbvarname="postalcode" value="#show.zipCode#"> <cfprocparam dbvarname="source" value="#session.siteName#"> </cfstoredProc> -- This retrieves the the data set using CFQuery. remember it is important to parameterize any variables you pass int. <cfquery name="executeStoredProc" datasource="#application.dsn.acw#"> exec [dbo].[PrcVisitorsRequestInformationUpdate] '', 'TEST', 'test', '[email protected]', '5555555555', '123 Test St.', 'Memphis', 'TN', '38701', 'NotClayton', 'Comments', 'NOT Web' </cfquery>