Never mind... figured it out. I needed javaCast when setting the values of the
Array.
<cfset reOrderArray[getColors.currentRow] = javaCast("int", variables.counter)>
> -----Original Message-----
> From: Chad Gray [mailto:[email protected]]
> Sent: Tuesday, January 12, 2010 1:35 PM
> To: cf-talk
> Subject: RE: reorder a query
>
>
> While I am looking over Roberts code that he sent me why would I get a
> casting error for this code? I take the ORDER BY statement out of the
> Query of a Query and it does not error.
>
> Error casting an object of type java.lang.Double cannot be cast to
> java.lang.String to an incompatible type.
>
> <cfset QueryAddColumn(getColors, "reOrder", "integer", reOrderArray)>
>
> <cfquery dbtype="query" name="newOrder">
> SELECT ColorName
> FROM getColors
> ORDER BY reOrder
> </cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329578
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4