MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference page 195

Cfml language reference
Table of Contents

Advertisement

Chapter 1: ColdFusion Tags
MAXLENGTH
Optional. Maximum length of the parameter. The default value is the length of the
string specified in the VALUE attribute.
SCALE
Optional. Number of decimal places of the parameter. The default value is zero.
Applicable for CF_SQL_NUMERIC and CF_SQL_DECIMAL.
NULL
Optional. Specify Yes or No. Indicates whether the parameter is passed as a NULL.
If you specify Yes, the tag ignores the VALUE attribute. The default value is No.
Usage
The CFQUERYPARAM is designed to do the following things:
Allows the use of SQL bind parameters.
Allows long text fields to be updated from an SQL statement.
Improves performance.
The ColdFusion ODBC, DB2, Informix, Oracle 7 and Oracle 8 drivers support SQL bind
parameters. However, at present, the ColdFusion Sybase 11 driver and Sybase native
driver do not support SQL bind parameters.
If a database does not support bind parameters, ColdFusion still performs validation
and substitutes the validated parameter value back into the string. If validation fails,
an error message is returned. The validation rules follow:
For types CF_SQL_SMALLINT, CF_SQL_INTEGER, CF_SQL_REAL,
CF_SQL_FLOAT, CF_SQL_DOUBLE, CF_SQL_TINYINT, CF_SQL_MONEY,
CF_SQL_MONEY4, CF_SQL_DECIMAL, CF_SQL_NUMERIC, and
CF_SQL_BIGINT, data values can be converted to a numeric value.
For types CF_SQL_DATE, CF_SQL_TIME and CF_SQL_TIMESTAMP, data values
can be converted to a date supported by the target data source.
For all other types, if the MAXLENGTH attribute is used, data value cannot
exceed the maximum length specified.
The SQL syntax generated by the ColdFusion server is dependent on the target
database.
For an ODBC, DB2, or Informix data source, the generated syntax of the SQL statement
is as follows:
SELECT *
FROM courses
WHERE col1=?
For an Oracle 7 or Oracle 8 data source, the syntax of the SQL statement is as follows:
SELECT *
FROM courses
WHERE col1=:1
171

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents