A hot fix has been created to address several issues with cfinsert and cfupdate in ColdFusion MX 6.1. The hot fix in this TechNote resolves all three issues documented here and supercedes the previous hot fixes released for these issues.
With ColdFusion MX 6.1, when cfinsert or cfupdate is used with a table with certain column names, some form fields are not correctly mapped to the table column names. This happens intermittently.
The problem occurs when one column name is a portion of another, longer column name. ColdFusion tries to prevent duplicate field names by searching the SQL generated so far for the current field name. This does not work if the current field name is a portion of a longer previous field name.
For example, consider the following three column names: JOB, FIRSTJOB, JOBTYPE. Since the column names are retrieved from the database without specifying any order, they may be placed into the generated SQL in any order. The problem happens when a shorter column name (JOB) happens to be placed after a longer column name (JOBTYPE) which includes it.
When retrieved in the order of JOB, FIRSTJOB, JOBTYPE, the SQL statement would be generated in this way:
insert into TABLE_NAME (JOB, FIRSTJOB, JOBTYPE) values (value, value, value)
When retrieved in the order of FIRSTJOB, JOB, JOBTYPE, the SQL statement would be generated in this way:
insert into TABLE_NAME (FIRSTJOB, JOBTYPE) values (value, value)
Inserts and updates against ColdFusion MX 6.1 password-protected data sources fail in some situations if no username and password is specified for the data source within the ColdFusion Administrator. Instead, the following error will be seen:
Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][SequeLink Server]Required user name is missing.
Inserts and updates initiated through the use of cfinsert, cfupdate, cfgridupdate or cfstoredproc attempt to get a connection to the database without passing the username and password specified within the tag. If this information has not been defined for the data source within the ColdFusion Administrator, the connection attempt will fail.
This issue is similar to issue 52972 described above. In this case, however, the problem only occurs with fields having empty ("") string values.