cfc return message
Hi, in my cfc, i have insert query into the table. I want it to return the message and send it back to cfm page but don't know how, can you please help? Thanks KT
<!---my cfc--->
<cfcomponent name="list_queries">
<cffunction name="add" returntype="query">
<cfargument name="form" required="yes" type="struct">
<cftry>
<cfquery name="insertMessage" datasource="#request.dbsource#" result="returnMessageID">
INSERT INTO admin_Message
(Title,Description)
VALUES(
<cfqueryparam value="#trim(arguments.form.title)#" cfsqltype="cf_sql_varchar" maxlength="255" />,
<cfqueryparam value="#trim(arguments.form.description)#" cfsqltype="cf_sql_longvarchar" />,
)
</cfquery>
<!--- if insert fails --->
<cfcatch type="database">
<cfset isSuccessful=false>
</cfcatch>
</cftry>
</cffunction>
</cfcomponent>
<!---my cfm--->
<cfobject type="component" name="request.outages" component="cfcs.outage">
<cfset variables.add = request.outages.add(form)>
i want to diplay message here after the inserted from cfc
