0 Replies Latest reply on Apr 18, 2006 7:32 AM by michaelhiggins

    I need Data!! Please help

      I have a flex1.5 application(I got it from cflex) that uses a http service to connect to a database and return xml. I put my results into a datagrid and everything was peachy. In trying to take that app over to flex2.0 Beta my datagrid does not get populated. I have an alert showing me the result of my httpservice by saying result.childNodes.toString(). Can someone please look at my code and see if you see something that will help. PLEASE????

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute">
      import mx.controls.Alert;
      private var sSQL:String;

      private var myData:Object;

      private function getData():void
      sSQL = tiSQL.text;
      var oRequest:Object = new Object();
      oRequest.sql = sSQL;
      var oRequestCall:Object = mxdsSQLXMLRoot.send(oRequest);
      private function myResultHandler():void

      <mx:HTTPService id="mxdsSQLXMLRoot"
      url=" http://localhost/webservice/SQLXMLRoot.asp"

      <mx:TextArea id="tiSQL"
      width="400" height="200"
      text="SELECT firstname, middlename, lastname from students FOR XML AUTO"/>
      <mx:Button label="GetData" click="getData()" x="23" y="208"/>

      <mx:DataGrid id="rGrid" width="400" height="248" dataProvider="{myData.childNodes}" x="0" y="238">
      <mx:DataGridColumn dataField="firstname" headerText="First Name"></mx:DataGridColumn>
      <mx:DataGridColumn dataField="middlename" headerText="Middle Name"></mx:DataGridColumn>
      <mx:DataGridColumn dataField="lastname" headerText="Last Name"></mx:DataGridColumn>

      My results look like:
      <students firstname="Michael" middlename="Jeffrey" lastname="Jordan"/>
      <students firstname="George" middlename="W" lastname="Bush"/>