Hello all,
I have a quick simple question that I hope someone can enlighten me with...
What would be best practice to see if a record object has been loaded or not? my current script is as follows:

<cfif len(userRecord)>
            <cfset arguments.event.setValue("badLogin","Invalid Username or Password") />
            <cfset arguments.event.addResult("notLoggedIn") />
        <cfelse>
            <cfset session.isLoggedIn = true />
            <cfset session.username = #userRecord.getuserName()# />
            <cfset arguments.event.addResult("loggedIn") />
        </cfif>

"userRecord" being the object...


I'm getting the following error:

Complex object types cannot be converted to simple values.
Detail 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.


thanks in advance...
sal

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to