CFC Error on QoQ
Error:
Error casting an object of type to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
| The error occurred in C:\Inetpub\wwwroot\RMS\Untitled-3.cfm: line 15 | |
13 : <cfloop from="1" to ="#listlen(application.Sql_SC)#" index="i"> 14 : union 15 : <cfquery name="GetZone#i#" datasource="#i#"> 16 : SELECT ccflocationID, Location_Name 17 : FROM ccflocation | |
---------------
<cfcomponent hint="This cfc goes to Scorecard environment and grabs some stuff">
<cffunction name="Zone" access="public" returntype="Query">
<cfset myLoc = QueryNew("ccflocationID,Location_Name", "Integer,VarChar")>
<cfargument name="DSN" required="true" type="string">
<cfquery dbtype="query" name="GetZone">
select ccflocationID, Location_Name from myLoc
<cfloop from="1" to ="#listlen(arguments.DSN)#" index="i">
union
<cfquery name="GetZone#i#" datasource="#i#">
SELECT ccflocationID, Location_Name
FROM ccflocation
</cfquery>
</cfloop>
</cfquery>
<cfreturn GetZone>
</cffunction>
</cfcomponent>
