Here's the function..
<cffunction access="public" name="getBody" output="true" returntype="any"
description="gets body text">
<cfif IsDefined("url.id")>
<cfset page_id= #url.id#>
<cfelse>
<cfset page_id= 0>
</cfif>
<cfquery datasource="#request.dsn#" name="qGetBodyContent">
SELECT bodyText_content
FROM tbl_bodyText
WHERE FK_page_id = #page_id#
</cfquery>
<cfreturn qGetBodyContent>
</cffunction>
-----Original Message-----
From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 21, 2007 5:04 PM
To: CF-Talk
Subject: Re: return variable error
You will need to pass back a string of the data no doubt. Post your CFC
code.
"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540. It contains information which is
confidential and may also be privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful. If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910. The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions."
Visit our website at http://www.reedexpo.com
-----Original Message-----
From: Scott Stewart
To: CF-Talk
Sent: Wed Mar 21 20:59:41 2007
Subject: return variable error
Hey all,
I've got a component that runs a query. The query returns a bunch of HTML in
a MS Access memo field.
When I invoke the query I set a return variable called bodyStruct. I can
dump this variable and see the contents
<cfset BodyObj=CreateObject("component","webControl")>
<cfinvoke component="#BodyObj#" method="getBody"
returnvariable="bodyStruct">
When I try to use it in a cfoutput I get the following 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.
"
Any ideas n how to output this sucker?
Thanks
sas
Scott Stewart
ColdFusion Developer
HYPERLINK
"http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=7241+Jillspring+Ct&csz=Sprin
gfield%2C+VA.+22152&country=us" \n7241 Jillspring Ct
Springfield, VA. 22152
HYPERLINK "mailto:[EMAIL PROTECTED]" [EMAIL PROTECTED]
HYPERLINK "http://www.sstwebworks.com" \nhttp://www.sstwebworks.com
tel:
mobile:
HYPERLINK
"http://www.plaxo.com/click_to_call?src=jj_signature&To=703-912-3076&Email=s
[EMAIL PROTECTED]" \n703-912-3076
HYPERLINK
"http://www.plaxo.com/click_to_call?src=jj_signature&To=703-220-2835&Email=s
[EMAIL PROTECTED]" \n703-220-2835
HYPERLINK
"https://www.plaxo.com/add_me?u=25770055805&src=client_sig_212_1_card_join&i
nvite=1" \nAlways have my latest info
HYPERLINK "http://www.plaxo.com/signature?src=client_sig_212_1_card_sig"
\nWant a signature like this?
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.16/729 - Release Date: 3/21/2007
7:52 AM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273325
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4