Flash Remoting: Client.Data.UnderFlow with over ColumnList
Related Categories: Flash Remoting ColdFusion,
Working on a Flash Remoting/CF app for a client I got this nasty Client.Data.UnderFlow reported in the NetConnection Debugger. I found a few hits in Google on it but nothing satisfying my particular incident. My CFC called a four methods, three of which returned simple data (numeric and string) and one which returned a query object. I created a structure to return from my CFC and populated the structure using structInsert and looping over the returned query columnlist. Pretty straightforward -- worked when I dumped the struct in the CFC and when I call the CFC from the browser. However, Flash Remoting (FR) always returned Client.Data.UnderFlow. Here's some psudocode:
<cfset structInsert(myStruct, i,myQuery[col])>
</cfloop>
<cfset structInsert(myStruct, "A", myCFCMethod.valueA)>
<cfset structInsert(myStruct, "B", myCFCMethod.valueB)>
<cfset structInsert(myStruct, "C", myCFCMethod.valueC)>
Diagnosis: When you loop over the query columnlist using this syntax above (or using
Workaround: You can do two things -- either use structCopy or Reference the query results as array values
- structCopy will return struct to FR (<cfreturn structCopy(myStruct)>). However, the Result object (object#2) will store each key containing simple values in name:value pairs. Each key containing query values will be stored in the Result object as array objects. Note: Using duplicate() will return Client.Data.UnderFlow.
- Referencing array values (<cfset myStruct[col]="myQuery[col][1]">). Specifying the index number (in addition to the column name (col)in your array notation inside your cfloop will ensure you retrieve the actual data instead of a pointer to it. Now when you return myStruct to FR all the values are simple and stored in the Result object in name:value pairs.



There are no comments for this entry.
[Add Comment] [Subscribe to Comments]