Groups | Blog | Home
all groups > flash data integration > february 2005 >

flash data integration : RemotingConnector : how to access to the result


carstenw
2/6/2005 7:12:01 PM
Hello,

how can I access directly the result of an RemotingConnector ?

With the NetConnection Debugger I get the results visible
but how can I e.g. read the value of "zahl" to calculate something with
it in AS ?

Result (object #2)
......mRecordsAvailable: 1
......serverInfo: (undefined)
......uniqueID: 1
......_items (object #3)
...........[0] (object #4)
................__ID__: 0
................bemerkungen: "Testbenutzer f?ie deutsch Sprache"
................benutzer: "a"
................id: "2"
................passwort: "cc"
................schluessel: ""
................sprache: "DE"
................zahl: "22"
......mTitles (object #5)
...........[0]: "id"
...........[1]: "benutzer"
...........[2]: "passwort"
...........[3]: "schluessel"
...........[4]: "bemerkungen"
...........[5]: "sprache"
...........[6]: "zahl"

Thank you for help.

Carsten
sixlead
2/6/2005 10:21:49 PM
assuming that your connection is returning a record set you can use the
following methods to get at the records getColumnNames() getLength()
getItemAt() cn = recSet.getColumnNames(); //retrieve all column names len =
recSet.getLength(); // retrieve number of records for (i = 0; i < len;
i++){ // loop through array record = recSet.getItemAt(i); // assign
individual record to a variable for (c in cn){ // use for ..in loop to
iterate over object properties output += record[cn[c]] + ', '; }
trace(output); // display record output = ''; // reset variable for
next loop }
carstenw
2/7/2005 8:29:08 AM

Thank You, but I have the following code delivering the
RemotingConnector, named with "rc", on the stage:

on(click){
rc.gatewayUrl = _global.amfphp_gateway;
rc.params = new Array("a","cc");
rc.trigger();
trace(rc. ... <--- How to continue ?????? rc.RecSet["zahl"]
}
I don't know how to place the code


[quoted text, click to view]
Pim.Man
2/25/2005 11:47:40 AM
Try this:


function categoryResult(ev:Object) {
trace("Got Categories - " + ev.target.results);
}
function categoryStatus(stat:Object) {
trace("Categories Error - " + stat.code + " - " + stat.data.faultstring);
}
cf.addEventListener("result",categoryResult);
cf.addEventListener("status",categoryStatus);
AddThis Social Bookmark Button