This content has been marked as final. Show 7 replies
Down to the basics. Does this display what you want?
<cfquery datasource="#application.db#" name="GetGig">
WHERE ADMINID = 6
You are using 5 times the same variable name.. so the var is "overwrited" in Flash and you get only the last one.
You need the to concatenate the getgig.gigdesc and show it in the textbox ? Or you have different textboxes ?
If i call the data in coldfusion, i get all my records...
But when i call it into flash, only my 1st record shows.
I have a feeling the problem may come from within flash.
Can I perhaps send a file for you to take a look at?
Its as if the result doesnt loop in the Flash file...
I don't know if I get it rigth your situation, but I suppose something like :
You CF page returns the query in the url encoded var format (var=1&var2=2&var=3...)
And in your flash, you have the loadvars or loadvariables("cfpage.cfm")
That will return the vars defined in the cfpage in your Flash (var, var1..)
Now.. how are you trying to use this vars in the Flash file ?...
You can't loop the result, you don't receive a recordset, just a collection of variables. Copy the code or send it if you prefer.. both CF and Actionscript.
This is basically the same type of explanation as from Sojovi, but it stems from the fact that CF is a server side tehcnology and Flash is a client side technology.
In your situation, Flash is not loaded until after all the processing is done and CF can only feed it whatever the last variable was. As stated, the variable is technically being overwritten (or replaced) over and over until the last one is recorded. This is why you only see the one record.
In order to get the results you want, you either need to build an output using the appropriate Flash generating tags in CF ( i.e. CFFORM can be designed to create Flash output.) or you have to create a data or xml connector in your own flash file using actionscript so it will draw the data itself.
You could compromise a bit and do both ... have Flash call an XML file for its data, but target a CF page that generates an XML output.
The key is to leave your CFML code intact, irrespective of how you intend to use Flash. There are ways to just pass the query to Flash as a recordset.