SQL in your CF code can be made dynamic more easily.

The SP equivalent involves a SQL string and EXEC(). Not pretty.

Adrian
Building a database of ColdFusion errors at http://cferror.org/

-----Original Message-----
From: Marie Taylore
Sent: 30 October 2008 15:49
To: cf-talk
Subject: cfqueryparam vs cfstoredproc?


Question... the more I read about CFQUERYPARAM the more it seems it
mitigates many of the problems that using stored procedures also solves.  I
realize with stored procedures you have a lot more power in terms of SQL
scripting, but for basic queries, is CFQUERYPARAM just as fast as (or faster
than) running CFSTOREDPROC?

For a CFSTOREDPROC vs CFQUERYPARAM "debate" what would be the "better thans"
on each side of the argument?

A few I can think of off the top of my head would be:

Stored Procedures - can contain advanced SQL & procedural code.  Encapsulate
code outside of you application for a layer of abstraction.

CFQUERYPARAM - allows non-DBAs to take advantage of pre-compiled queries,
providing speedier and more secured code.  You can "encapsulate" much the
same way a stored procedure does with CFCs.

Would love to hear from others on the advantages/disadvantages of each

Thanks!

Marie

keywords for searching: cfprocparam vs cfqueryparam, cfqueryparam vs
cfprocparam, cfprocresult, cfquery, cftransaction, cfupdate, cfinsert


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314607
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to