Thanks, Jim. This helps a lot.
Johnny
>> -----Original Message-----
>
>It's definitely at least a little flakey (which is why I stressed testing
>this stuff out first). It seems to only be an array on a direct access, not
>an assignment. So the following all work fine:
>
>+) IsArray(QueryName["Column"]) does indeed return "Yes".
>
>+) <cfloop from="1" to="#ArrayLen(QueryName["Column"])#" index="Cnt"> works
>just fine.
>
>+) ArrayToList(QueryName["Column"]) gives you a list of all column values
>(as would "ValueList()").
>
>However you're right: when making an assignment (which, I _think_ CFDump
>does internally) you get the value of the first row.
>
>So <cfset foo = QueryName["Column"] /> has the same result as <cfset foo =
>QueryName.Column />
>
>However things get stranger still because this
>
><cfoutput>#QueryName["Column"]#</cfoutput>
>
>actually results in a error ("Complex object types cannot be converted to
>simple values.") were this
>
><cfoutput>#QueryName.Column#</cfoutput>
>
>results in the output of the first cell of the column.
>
>So while you can use the indexed notation reference as an array nearly every
>place you can't copy it. At least not simply - however you CAN duplicate
>it! The following will get you your array:
>
><cfset foo = Duplicate(QueryName["Column"]) />
>
>"Foo" will now be an array of all values in the column.
>
>I'm sure that's not exhaustive, but I hope it at least frames how this works
>and further underlines the point to test it out before you rely on it.
>
>Jim Davis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200209
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54