I am passing a query to a cfc. When I dump the query in the
cfc it looks fine. However, when I attempt to loop over the query 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.
Here is the code:
<cffunction name="updateTYC_Card_Master" access="public"
returntype="void">
<cfargument name="GoodRequests" required="yes"
type="query">
<cfargument name="dsn" required="yes" type="string">
<cfargument name="newjobNo" required="yes"
type="string">
<!--- <cfdump var="#arguments.goodRequests#">
<cfabort> --->
<cfloop query="#ARGUMENTS.GoodRequests#">
<cfquery name="UpdateTYC_Card_Master"
datasource="#ARGUMENTS.dsn#">
Update READONLY.TYC_Card_Master
Set Job_Key = #ARGUMENTS.jobNo#
Where custno = #custno#
And job_key = -1
</cfquery>
</cfloop>
</cffunction>
How would I go about being able to use the contents of the
query that I passed into the cfc. I've never passed in a query
before. Thanks for the help.
mark