Cool.... Glad to help :)
Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -----Original Message----- From: Sonny Savage [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 10:18 AM To: CF-Talk Subject: Re: cfqueryparam Thanks Mark! I have recently started using cfqueryparam, I learned the bad habit of not using them during my first CF job. I had the suspicion that things worked as you've elaborated, but I wanted to confirm. The doubts in my mind came about because I've done some PL/SQL programming and I've only seen bind variables used when the value is actually variable. On Fri, Mar 14, 2008 at 10:43 AM, Mark Kruger <[EMAIL PROTECTED]> wrote: > Sonny, > > These "constants" are not constants to the SQL server. To the SQL > server these are still unbound variables... So yes, you need to use > cfqueryparam if you want to hit the cache pool and execution plan > cache. Otherewise the driver hands off the "prepare" operation to the > SQL server - meaning no cache hit is possible. As a point of interest > ... Why would you ask this question? Why not just use cfqueryparam as > a matter of standard practice for all input variables? > > -Mark > > > Mark A. Kruger, CFG, MCSE > (402) 408-3733 ext 105 > www.cfwebtools.com > www.coldfusionmuse.com > www.necfug.com > > -----Original Message----- > From: Sonny Savage [mailto:[EMAIL PROTECTED] > Sent: Friday, March 14, 2008 9:36 AM > To: CF-Talk > Subject: cfqueryparam > > As I understand it, cfqueryparam enhances performance by using bind > variables. My question is whether it helps to use cfqueryparam for > constants in a query. > > Example > SELECT * FROM myTable WHERE code = 'X' > -vs- > SELECT * FROM myTable WHERE code = <cfqueryparam value="X" > cfsqltype="cf_sql_char" maxlength="1"> > > -- > Edward A Savage Jr - "Sonny" > Senior Software Engineer > Creditdiscovery, LLC > "I was gratified to be able to answer promptly. I said I don't know." > ~ Mark Twain > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301336 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4