It's pretty easy with the ordinary CF Query*() functions:

<cfset countryArray = aResults.getValues().getKeyValuePair()>
<cfset countryQuery = QueryNew("code,country")>
<cfloop index="i" from="1" to="#ArrayLen(countryArray)#">
   <cfset QueryAddRow(countryQuery)>
   <cfset QuerySetCell(countryQuery, "code", i)>
   <cfset QuerySetCell(countryQuery, "country", countryArray[i].key)>
</cfloop>

<cfdump var="#countryQuery#">

-tom-

james carberry wrote:
> Worked perfectly!!
> 
> Do you know if there is an easy way to move the info in the array to a 
> regular ColdFusion query object?
> 
> Thx!
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to