This content has been marked as final. Show 3 replies
Lets say this is your industry select query,
<cfquery name="Q_SelectIndustry" datasource="#your_data_source#>
select industry_name,industry_id,address,city from tbl_industry
And the other query which is actullay used to populate the edit form,
<cfquery name="Q_userInfo" datasource="#your_data_source#>
select firstname,lastname,industry_selected,etc,etc, from tbl_industry
Then inside your <form> tag (in where you actually have the drop down box) your code should be looking like this,
<option value=#industry_id# <cfif #Q_userInfo.industry_selected# eq #Q_SelectIndustry.industry_id#>selected</cfif>>#industry_name#</option>
Following the above steps i get the error...
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.