vistasoul
05-16-2005, 04:41 PM
Hi... I've successfully connected to my database using Coldfusion component and Flash remoting... and my output shows that the data has been recieved. But I can't seem to get the field I want to show in the text box... all it's outputting in the textbox is "Undefined".
I want the field "bandname" to show in the text box.... here is the code I have.
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
// connect to service and create service object
var howdyService:Service = new Service("http://www.mywebsite.com/flashservices/gateway", new Log(), "com", null, null);
// call the service flash() method
var pc:PendingCall = howdyService.flash();
// tell the service what methods handle result and fault conditions
pc.responder = new RelayResponder(this, "getSet_Result");
function getSet_Result(result) {
myRecordSet = new RecordSet(["bandname"]);
myRecord = myRecordSet.getIemAt(0).bandname;
messageDisplay.text = myRecord;
}
I'm guessing the function "getSet_Result()" is where the problem is.
I want the field "bandname" to show in the text box.... here is the code I have.
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
// connect to service and create service object
var howdyService:Service = new Service("http://www.mywebsite.com/flashservices/gateway", new Log(), "com", null, null);
// call the service flash() method
var pc:PendingCall = howdyService.flash();
// tell the service what methods handle result and fault conditions
pc.responder = new RelayResponder(this, "getSet_Result");
function getSet_Result(result) {
myRecordSet = new RecordSet(["bandname"]);
myRecord = myRecordSet.getIemAt(0).bandname;
messageDisplay.text = myRecord;
}
I'm guessing the function "getSet_Result()" is where the problem is.