Yes, I do this all the time. The query results will be returned in 
the result property of the ResultEvent as an ArrayCollection.  I 
don't do any formatting of the dataProvider, I just assign the query 
results to it.  Here's a code snippet that I use when doing this:

protected function onListResult(re:ResultEvent):void {
   dgJob.dataProvider = ArrayCollection(re.result);
}


--- In flexcoders@yahoogroups.com, "Chad Gray" <[EMAIL PROTECTED]> wrote:
>
> If in my CFC that I am connecting to with RemoteObject can I return 
a Query object to Flex?
> 
> Here is an example cfc:
> <cffunction name="getJob" returnType="query" output="no" 
access="remote">
>       <cfargument name="jobNum" type="numeric" required="yes">
> 
>       <cfquery datasource="database" name="getJobInfo">
>       SELECT JobName, Description
>       FROM Job
>       WHERE JobNum = #arguments.jobNum#
>       </cfquery>
>                       
>       <cfreturn getJobInfo>
> </cffunction>
> 
> 
> Or should I stick to returning XML?
> 
> My goal for this exercise is to take the data and put it in a 
DataGrid component.
> 
> Second question is how do I format the dataprovider in the datagrid?
> 
> <mx:DataGrid id="dgJob" dataProvider="{roGetJob.?????}">
>


Reply via email to