4 Replies Latest reply on Jun 8, 2006 10:26 PM by MikerRoo

    cfqueryparam and SQL 2005

      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?
        • 1. Re: cfqueryparam and SQL 2005
          Dan Bracuk Level 5
          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?
          • 2. Re: cfqueryparam and SQL 2005
            Jim-sama Level 1
            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.
            • 3. Re: cfqueryparam and SQL 2005
              Dan Bracuk Level 5
              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.
              • 4. Re: cfqueryparam and SQL 2005
                MikerRoo Level 1
                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.