Yes we can call stored procedures by using <cfquery> tag. Below code depicts how to call a my SQL stored procedure by using <cfquery>.
<cfquery datasource="ebms" name="k">
CALL ebmsSP_getOptedOutEmployeeList
(
<cfqueryparam value="1" cfsqltype="cf_sql_integer" >,
<cfqueryparam value="1" cfsqltype="cf_sql_integer" >,
<cfqueryparam value="Y" cfsqltype="cf_sql_char">
);
</cfquery>
What if you need to return a value? How do you get that in return?
ReplyDeletethe value would be in a variable indicated by the name attribute of the cfquery tag (just like any normal cfquery call)
ReplyDelete