Bad Error Message
I recently did this:
<cfoutput query="#queryName#"> ... </cfoutput>
Can you spot the error?
I think that is probably a very common mistake - here's the error message you get in ColdFusion MX 6.1:
Complex object types cannot be converted to simple values. The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values. The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a CFIF tag. This was possible in ColdFusion 2.0 but creates an error in later versions. The error occurred on line 14.
I realize that this is a generic error message, but in this case - for what is probably a very common thing to do - why not something like You passed in a query object, when we expected the name of a query. You may need to remove the pound signs..
- Spelling Strikes Again - November 16, 2007
- Error Jargon - January 9, 2006
- Google says disable your firewall - December 10, 2005
- ColdFusion returning empty response with server-error: true
- Careful applying CF11u16, CF2016u8, CF2018u2
- Sessions don't work in Chrome but do in IE
- csrfVerifyToken does not invalidate the token
- The cf_sql_ is optional in cfqueryparam
- Cookie Expires / Max-Age 1969-12-31T23:59:59.000Z
- Burst Throttling on AWS API Gateway Explained
- How to Resolve Java HTTPS Exceptions