Skip to main content
Participating Frequently
June 8, 2006
Question

cfqueryparam and SQL 2005

  • June 8, 2006
  • 2 replies
  • 542 views
I've heard a rumor, which I can't find any verification, that sql server 2005 makes cfqueryparam useless. Has anyone else heard of this and can point to a reference that spells this out? Or does anyone have categorical proof that cfqueryparam is still needed in sql server 2005?
This topic has been closed for replies.

2 replies

Inspiring
June 8, 2006
Still needed? But it's not needed now. There is a difference between beneficial and need you realize.

If you actually have sql 2005, make up some queries that you know will take at least a couple of seconds to run, and run them with and without cfqueryparam. If you notice no performance improvement with cfqueryparam, the perception you are combatting might actually be accurate.

From my point of view, increased query speed is the only thing that justifies the extra complications that cfqueryparam entails.
Inspiring
June 8, 2006
Useless?
Still needed?

Don't know about mssql, but with Oracle, cfqueryparam makes queries run faster. What is the reason you are currently using it with mssql?
Jim-samaAuthor
Participating Frequently
June 8, 2006
I always use it in my code, but word is passing around that it's not necessary in mssql 2005, that it somehow auto handles it and the binding, but i can't find anything to back this up perception, and would like to correct this mis-perception and have proof to back up that cfqueryparam is still needed.
June 9, 2006
If somebody makes a preposterous new claim, the burden is on THEM to prove it.
Don't fall for the trick that you must disprove such malarky.

Nothing's changed with SQL server 2005. From performance, decoupling, security, and maintainabilty perspectives: stored procedures work best, cfqueryparam next best, and ad hoc queries will bite you sooner or later.