Complex object types cannot be converted to simple values.

402 views
Skip to first unread message

Yannick

unread,
Oct 19, 2010, 10:25:16 PM10/19/10
to ColdFusion on Wheels
What I'm doing wrong? that is the question.

I'm trying to output a resultset.

MODEL
=======

<cffunction name="getOurActions" returntype="query">

..... my sql goes there .....

<cfreturn qryOurActions>

</cffunction>

CONTROLLER
=============
<cfset ouractions =
model("action").getOurActions(memberid="#session.user.id#")>

VIEW
=====
<cfparam name="ouractions" type="query">

<cfloop query="#ouractions#">
#ouractions.description#
</cfloop>

and then I get the error message " Complex object types cannot be
converted to simple values. "

I did a cfdump var="#ouractions#" and I get this:

query
RESULTSET
query
DESCRIPTION
1 test1
2 test2

Yannick

unread,
Oct 19, 2010, 10:38:43 PM10/19/10
to ColdFusion on Wheels
Cancel that...I need to go to bed...its because I did:

<cfloop query="#ouractions#"> and not <cfloop query="ouractions">

My library of knowledge went to standby mode but forgot to inform my
brain.

Andy Bellenie

unread,
Oct 20, 2010, 8:24:58 AM10/20/10
to cfwh...@googlegroups.com
Hahaha late night coding brain fog...

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.


Reply all
Reply to author
Forward
0 new messages