Pete Freitag Pete Freitag

The default cfsqltype for cfqueryparam

Updated on June 27, 2024
By Pete Freitag

If you want to save yourself some typing, note that cf_sql_varchar is the default value for the cfsqltype attribute in the cfqueryparam tag.

So you can omit the cfsqltype attribute, if your type is cf_sql_varchar at the expense of some readability.

I probably would not mention this if cfqueryparam was not so verbose. Why not type="varchar" what's with all the cfsql/cf_sql_?

Update: As of ColdFusion 11 you can omit the cf_sql_ prefix on the cfsqltype attribute of the cfqueryparam tag.

cfml cfqueryparam

The default cfsqltype for cfqueryparam was first published on April 07, 2005.

If you like reading about cfml, or cfqueryparam then you might also like:


The Fixinator Code Security Scanner for ColdFusion & CFML is an easy to use security tool that every CF developer can use. It can also easily integrate into CI for automatic scanning on every commit.

Try Fixinator

The weekly newsletter for the CFML Community


Ah, great tip. You're right, cfqueryparam is horribly verbose, if nothing else this may improve readability...
by Ryan Guill on 04/07/2005 at 1:02:43 PM UTC