Dan, I don't know where 'security plans' was mentioned in my post. My conclusion is that query params and security plans are both good things, but they are unrelated. I'll stand by my SQL injection protection statement though. When you use <cfqueryparam> and include the CFSQLType attribute in the tag, you not only tell your RDBMS what the data type of the parameter is, but if it is a string, it is automatically wrapped in single quotes. This will prevent any embedded SQL statements from being parsed and executed by the RDBMS during the execution of the query. This is backed up by the Adobe Livedocs section on <cfqueryparam>. Utilizing <cfqueryparam> is Adobe's recommendation, as stated at the top of that document. Here is an excerpt: "Adobe recommends that you use the cfqueryparam tag within every cfquery tag, to help secure your databases from unauthorized users. For more information, see Security Bulletin ASB99-04, “Multiple SQL Statements in Dynamic Queries,” at www.adobe.com/go/sn_asb99-04, and Accessing and Retrieving Data in the Developing ColdFusion Applications." I'll also stand by the explained behavior of query plans, as this too is backed up by the same Livedoc. It refers to this functionality as "SQL bind parameters", and explains it this way: "To benefit from the enhanced performance of bind variables, use cfqueryparam for all ColdFusion variables, and your DBMS must support bind variables. If a DBMS does not support bind parameters, ColdFusion validates and substitutes the validated parameter value back into the string. If validation fails, it returns an error message." Looks like Jason beat me to this response while I was busy verifying the Livedocs! -Carl V.
... View more