all groups > macromedia flash flash remoting > november 2003 >
You're in the

macromedia flash flash remoting

group:

DataSet binding problems


DataSet binding problems Gib Sllab
11/21/2003 10:42:00 PM
macromedia flash flash remoting:
I'm new remoting so be patient. I've got the remoting all set up, everything connects correctly and I've verified in the Net Debugger that my recordset is being retrieved into Flash. I'm having major difficulties getting the recordset to bind to the DataSet. And then the binding the DataSet to a DataGrid.

I'm setting a variable like this:
function readRS_Result ( result ) {
trace("server responded: Records: " + result.getLength());
myRS = result;
}


I tried this but nothing worked:
this.myDataSet.dataProvider = myRS;

I'm pretty sure I have the DataSet and the DataGrid bound correctly. Not sure what I'm doing wrong. Thanks in advance.

-Rob

Re: DataSet binding problems renee
12/4/2003 1:38:58 AM
two possibilities come to my mind, either its a scope issue - did you define myRS outside of the function, like this?

var myRS;
function readRS_Result ( result ) {
trace("server responded: Records: " + result.getLength());
myRS = result;
}
this.myDataSet.dataProvider = myRS;

or the other thing... is that your last line might be executed before the server has returned into your _Result method... a timing issue. maybe try something like this?


var myRS;
function readRS_Result ( result ) {
trace("server responded: Records: " + result.getLength());
myRS = result;
_level0.doSomethingWithRSFunction(myRS);
}

you must insure that you aren't trying to do anything with the result set until you KNOW without a doubt that you have been informed it is populated and ready to go.

hope some of that helps - let me know if not and I can see if I can help more.

Renee


Re: DataSet binding problems Gib Sllab
12/4/2003 2:06:54 PM
Thanks that did it! You were right.

Re: DataSet binding problems mlmangione
12/4/2003 11:36:26 PM
Hello,
I was wondering which solution worked for you - the first or the second one and if it was the second one, could you post the code for the function _level0.doSomethingWithRSFunction(myRS); that you used? Thanks!

Matthew Mangione

Re: DataSet binding problems mlmangione
12/4/2003 11:47:17 PM
Actually no, I take that back. How did you find your fields (just a short quick example would be awesome). Thanks!

Matthew Mangione

Re: DataSet binding problems Gib Sllab
12/5/2003 2:45:06 PM
Anything I give you will assume you have the remoting installed correctly on the server and that your remoting components in flash work correctly as well. Let me ask you this, using your netConnection Debugger are you able to view the data there so you can verify it's being pulled in correctly. OR are you setting a static array or something within the flash file itself?

I'll tell you what if you want to post your email address I'll send you a zip file.

Re: DataSet binding problems mlmangione
12/5/2003 8:32:18 PM
The data is being pulled in correctly, and I can see that there are 2 records returned from the ColdFusion page. I used the trace command to see this results and they match up from what they should be. I would greatly appreciate if you could send me that zip file...my email is mlmangione@snet.net. Thanks!

AddThis Social Bookmark Button