I'm inviting myself into the fight club here maybe...the first rule....lol

Converting the query to a array of objects means I can map them to AS objects enforcing my model.  This mapping is one of my three favourite things about Flex.  Example, say you want to populate a datagrid with query data and make it editable.  Having this AS <-> CFC mapping makes this cake by returning a array of objects to Flex, then Flex returning that SAME Array of objects modified back to CF.  If you populated the datagrid with a query result, how do you get the edited data back to CF?  Possible yes, but painful IMHO.

Data that will never be edited I'd probably use XML for.  Others will disagree, but that's just been my experience so far.  XML is fast light and cheap via RemoteObject.  Actually I found it to be real fast via HTTPService too.

Without sounding like the 'herd mentality', its just a best practise too, eh?

And one more reason, its just more sexy!  Having been a Math major I need all the help I can get in that department.  hehe!

DK
Disclaimer - If any of the above annoys you, sue the coffe makers that forced me to consume so much coffee today. :)

On 10/16/06, Aaron West < [EMAIL PROTECTED]> wrote:
Douglas, out of curiosity how come you prefer to not send queries from
CF to Flex? Also, what do you do instead? You mentioned converting
the query record-set to an Array of Objects or XML.  What benefits do
you
get on the Flex end for doing this considering its more work for CF?


|  Aaron West
|  aaron AT trajiklyhip DOT com
|  http://www.trajiklyhip.com/blog/
|  Certified Advanced Adobe ColdFusion MX 7 Developer
|  Certified Macromedia FlashMX Developer
|  Adobe Community Expert


On Oct 16, 2006, at 8:55 AM, Douglas Knudsen wrote:

>  odd. Myself, I prefer not to return queries from CF to Flex.
> Instead convert to a array of objects or XML. That said, maybe try
> using the SQL for it direct, in case the Query functions are flaking
> somehow. The below would be for Oracle.
>
> <cfquery name="qry2" dbtype="query">
>   SELECT
>   TABLKEY, TABLFLD
>   FROM application.udf.getalldropdowns
>   WHERE
>   TABLID = '010'
> UNION
> SELECT '' AS TABLKEY, '' AS TABLFLD
> FROM dual
>
>
>   ORDER BY TABLFLD
>   </cfquery>
>
> DK
>
>
> On 10/16/06, Rick Root <[EMAIL PROTECTED]> wrote:so, I solved
> this problem.
>>
>> My data provider was a query returned by a remoting call created like
>> this:
>>
>> <cfquery name="qry2" dbtype="query">
>> SELECT
>> TABLKEY, TABLFLD
>> FROM application.udf.getalldropdowns
>> WHERE
>> TABLID = '010'
>> ORDER BY TABLFLD
>> </cfquery>
>> <cfset queryaddrow(qry2,1)>
>> <cfset querysetcell(qry2,"TABLKEY","")>
>> <cfset querysetcell(qry2,"TABLFLD","")>
>> <cfquery name="qry" dbtype="query">
>> SELECT * FROM qry2 ORDER BY TABLFLD
>> </cfquery>
>> <cfset retval.COUNTRIES = qry>
>>
>> I did it this way so I could always have a "blank" item in the
>> dropdown....
>>
>> The solution was to change the second querysetcell line to be the
>> following:
>>
>> <cfset querysetcell(qry2,"TABLFLD","- not selected -")>
>>
>> For some reason, the blank item caused every 5th label to disappear
>> for
>> no apparent reason.
>>
>> This seems like a bug.What's the address to report flex bugs to?
>>
>> Rick
>>
>>
>> --
>> Flexcoders Mailing List
>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>> Search Archives:
>> http://www.mail-archive.com/flexcoders%40yahoogroups.com
>> Yahoo! Groups Links
>>
>>
>>
>>
>
>
>
> --
> Douglas Knudsen
> http://www.cubicleman.com
> this is my signature, like it?



--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it? __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to