ColdFusion 8: CFPROCPARAM update
Posted by Rahul in ColdFusion 8
The behavior of 'dbvarname' attribute of <cfprocparam> tag is changed with ColdFusion 8. The attribute is now *used* on the contrary to ColdFusion 7. The documentation for ColdFusion 7 says
Changed the dbvarname attribute behavior: it is now ignored for all drivers. ColdFusion MX uses JDBC 2.2 and does not support named parameters.
Since ColdFusion 8 now supports JDBC 3.0, one can pass arguments to a stored procedure in any order by using dbvarname attribute. In earlier versions of ColdFusion we had to pass the attributes in the same sequential order as they are declared in the underlying stored procedure.
One thing to take care about is either you specify the dbvarname for all the parameters or none at all (in which case the parameters will be passed sequentially to the stored procedure. We just encountered a few procedures in our old applications, which were throwing errors as they had mixed usage of dbvarname i.e some parameters had dbvarname and some didn't which will fail in ColdFusion 8.
Update: Hemant Khandelwal, ColdFusion Engineering Manager just updated (see comments) that the changes to the dbvarname I talked above have been rolled back for the final release of ColdFusion 8. This means that the behavior of dbvarname will continue to be the same as ColdFusion 7. Thanks Hemant for the update.

