cfqueryparam

Overview ColdFusion Open BlueDragon Lucee

Verifies the data type of a query parameter and, for DBMSs that support bind variables, enables CFML to use bind variables in the SQL statement. Bind variable usage enhances performance when executing a cfquery statement multiple times. This tag is nested within a cfquery tag, embedded in a query SQL statement. If you specify optional parameters, this tag performs data validation.

Attributes

Name Required Type Default Description
cfsqltype No String SQL type that parameter (any type) is bound to.
defaultlist No If the list is empty this then this is the default value
list No Boolean Yes: The value attribute value is a delimited list No: it is not
maxlength No Numeric Maximum length of parameter.
null No Boolean Whether parameter is passed as a null value. Yes: tag ignores the value attribute No: does not
padding No The number of characters this data is padded out to
scale No Numeric Number of decimal places in parameter. Applies to CF_SQL_NUMERIC and CF_SQL_DECIMAL.
separator No Char Character that separates values in list, in value attribute.
4
sqltype No The SQL type that the parameter (any type) will be bound to.
value No String Value that CFML passes to the right of the comparison operator in a where clause. If CFSQLType is a date or time option, ensure that the date value uses your DBMS-specific date format. Use the CreateODBCDateTime or DateFormat and TimeFormat functions to format the date value.