In my example I have:

<cfcomponent output="false">
<cffunction name="getData" access="remote" returntype="query"
output="false">
<cfargument name="keywords" type="string" required="false" />

<cfset var local = structNew() />

then ...<cfquery ....


brad

On Wed, Apr 8, 2009 at 4:51 PM, dmkramerica <[email protected]>wrote:

>
>
> Hey guys,
>
> I followed this seemingly great article, and I've found that in the
> Crud.cfc portion of the example (here specifically)...
>
> 1:<cfcomponent output="false">
> 2: <cffunction name="getData" access="remote" returntype="Query">
> 3: <cfset var local = {} />
> <cfquery name="local.q" datasource="mstest">
> select id, name, type
> from test
> </cfquery>
> <cfreturn local.q/>
> </cffunction>
>
> ...the 3rd line cfset var local = {} throws this error:
> "Invalid token '{' found on line 3"
>
> Is this a CF8 v CFMX702 thing? If so, what is the solution?
>
> If I comment out the line and remove the 'local' prefix to the query name
> 'q', the cfc runs fine, and a test.cfml that invokes the cfc works fine, but
> the swf never gets data. (I added crossdomain.xml with allow "*")
>
> I'm thinking two things
> 1) the query result needs a collection wrapper for Flex to work?
> And
> 2) that I might have a minor have endpoint and/or source description
> problem in the mxml for the remote object because I'm a tad unclear which
> "root" is being referred to web root, app root.
>
> Thoughts/help?
>
> Please and thank you.
>
> Dov
>
>  
>

Reply via email to