Skip to main content
Participant
July 18, 2006
Question

help with code please in MX 7?

  • July 18, 2006
  • 1 reply
  • 247 views
Hello i've upgraded my Cold Fusion version to MX7 from Cold fusion 5 and runing into some problems with some of the code that worked fine under 5 right off the bat.
I get the following message below. The Backend is a 4th dimension Database. Any help would be appreciated i am not a Cold fusion developer so i'm trying to figure out if its worth the update to MX7 or not.. if everything has to be re-written it most likely would not be but if this is an easy fix it just might!! thanks:

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 in E:\InetPub\wwwroot\cfdocs\msquared\LoggedIn.cfm: line 22

20 :
21 : <CFOUTPUT>
22 : <CFSET Stuff = URL & "Login/#URLEncodedFormat(Stuff)#">
23 : </CFOUTPUT>
24 :
This topic has been closed for replies.

1 reply

Inspiring
July 18, 2006
20 :
21 : <CFOUTPUT>
22 : <CFSET Stuff = URL & "Login/#URLEncodedFormat(Stuff)#">
23 : </CFOUTPUT>
24 :

'URL' is a protected structure variable in MX 7. You can not use it as
a value like you are doing in line 22. I am not sure what that line is
trying to do, so I can not easily guess what the solution would be. But
most likely it would be just to change the 'URL' variable name
throughout your application to something more unique.


heather_delo wrote:
> Hello i've upgraded my Cold Fusion version to MX7 from Cold fusion 5 and runing
> into some problems with some of the code that worked fine under 5 right off the
> bat.
> I get the following message below. The Backend is a 4th dimension Database.
> Any help would be appreciated i am not a Cold fusion developer so i'm trying to
> figure out if its worth the update to MX7 or not.. if everything has to be
> re-written it most likely would not be but if this is an easy fix it just
> might!! thanks:
>
> 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 in E:\InetPub\wwwroot\cfdocs\msquared\LoggedIn.cfm: line 22
>
> 20 :
> 21 : <CFOUTPUT>
> 22 : <CFSET Stuff = URL & "Login/#URLEncodedFormat(Stuff)#">
> 23 : </CFOUTPUT>
> 24 :
>
>
Participant
July 19, 2006
Hi Ian thanks for responding! on this page its trying to retreive an email address and password. So if i were to change anywhere that im using URL as a value to something else like PageID so in this case the line would read: <CFSET Stuff = PageID & "Login/#PageIDEncodedFormat(Stuff)#> i might be ok... in this case? thanks again for the explanation!