• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 23. Stored Procedures > <cfquery> Versus <cfstoredproc>

<cfquery> Versus <cfstoredproc>

To execute a stored procedure, you can use either the <cfquery> or <cfstoredproc> tag. Each has its own advantages and disadvantages.

<cfquery> is the simpler of the two, while <cfstoredproc> is more powerful and provides access to otherwise inaccessible features. For example, stored procedures can return record sets to the ColdFusion template more efficiently through the <cfstoredproc> tag. This tag also provides support for multiple record sets returned from a stored procedure, meaning that you can create more than one record set from the same procedure. Finally, some variables, such as the status code that is created when the tag is called, are not available through a <cfquery>.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint