# Bind XMLConnector To DataSet during RUNTIME

**URL:** <https://forum.kirupa.com/t/bind-xmlconnector-to-dataset-during-runtime/42328>\
**Category:** flash\
**Created:** [February 7, 2004, 10:34pm UTC](https://forum.kirupa.com/t/bind-xmlconnector-to-dataset-during-runtime/42328 "2004-02-07T22:34:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoryBrowning](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RoryBrowning](https://forum.kirupa.com/u/RoryBrowning)\
**Post date:** [February 7, 2004, 10:34pm UTC](https://forum.kirupa.com/t/bind-xmlconnector-to-dataset-during-runtime/42328/1 "2004-02-07T22:34:54Z")

</div>

Howdy Y’all,

I’m trying to bind to a dataset from an xmlconnector. Here is my code:

the binding occurs but the dataset does not have any items (ie: length =0)

what is my problem?

i am also assigning schema and params to both components.  
[AS]

function GenerateGraphData(sql){  
trace(“depththingy:”+ mx.managers.DepthManager.kTop);  
this.createObject(“XMLConnector”, “xCON”, curLevel++);  
this.createObject(“DataSet”, “xDS”, curLevel++);  
xCON.URL = server+sql;  
xCON.direction = “receive”;  
xCON.ignoreWhite = true;  
xCON.params = new XML(XMLschema);  
xDS.schema = new XML(DSschema);  
trace("XMLConnector: "+xCON);  
trace("URL: "+xCON.URL);  
trace("DataSet "+xDS);  
//trace("xCON Results: "+xCON.results);

var src = new EndPoint();  
src.component = xCON;  
[//src.property](https://src.property) = “results.NewDataSet._x0030_”;  
src.property = “results”;  
src.location = “/NewDataSet/_x0030_”;  
[//src.event](https://src.event) = “result”;  
var dest = new EndPoint();  
dest.component = xDS;  
[//dest.property](https://dest.property) = “dataProvider:Array”;  
dest.property = “dataProvider”;  
[//dest.location](https://dest.location) = “Array”;  
[//dest.location](https://dest.location) = “XML”;  
[//dest.property](https://dest.property) = “items”;  
bind = new Binding(src, dest);  
xCON.trigger();  
xCON.addEventListener(“result”, xConResults);  
};

var xConResults = function (ev) {  
trace("xConResults "+ev.target);  
xDS.addEventListener(“afterLoaded”, xDsResults);  
err = bind.execute();  
trace(“just after execute dataProvider:”+ xDS.dataProvider.\_name);  
trace(“Err:”+err);  
trace(“just bound”+xDS.length);  
//trace("xCON Results: "+xCON.results);  
}  
var xDsResults = function (ev) {  
trace("xDsResults w/ xDs len: "+xDS.length+ " ev: "+ev.target);  
for( var t = 0; t \< xDS.length; t++ ){  
trace(xDS.items[t]);  
}  
}

[/AS]
