First, some background.

dbvarname is an attribute for cfprocparam to specify named parameters while calling a stored procedure. For details refer

Versions prior to ColdFusion5 had support for dbvarname. This was deprecated in ColdFusion MX, brought back in 7.0.1 and deprecated again in 7.0.2. The reason was the lack of proper support from multiple jdbc drivers. Since then, this was a major ask among ColdFusion users.

ColdFusion 11 brought this attribute back from the dead. It was disabled by default with a flag to enable it. ColdFusion 11 update 3 enabled it by default. Databases need a variable prefix for named parameters. (eg:- ":" for Oracle and "@" for SQLServer). If the database is SQLServer, it should be dbvarname = "@param1". This will break applications which were using this attribute without the prefix because this attribute was being completely ignored in prior versions. So to give some time for customers who don't want to change their code, in update 4 we introduced a flag to disable dbvarname.

-Dcoldfusion.ignoredbvarname=true jvm flag can be used to disable dbvarname attribute. This flag is only for CF11 and not for later versions.

Having to change lot of code is not pleasant but we believe that is the way forward.

1 Comment to “ColdFusion 11 and dbvarname attribute”

  1. Charlie Arehart
    Thanks for the info. It has indeed been a bit of a roller coaster ride.

    But it seems your final sentence is saying that going forward, into 12, there will be no provision to use this jvm arg to disable the dbvarname attribute, right? So folks who DID have the problem and for whom this JVM arg DID solve the problem will find that if they do NOT change code their code before 12, they will experience the failure again on moving to 12, right?

    So the upshot of this is that folks have between now and CF12's release (or a public prerelease) to make the needed code changes you offer.

    Am I reading this right? Thanks.

Leave a Comment

Leave this field empty: