hi

are u gettingbthe result inside flex..then no probs, in the webservice
resulthandler method you would be do like this..

    var combosource:XML=new XML();
        public function loadCombo(event:ResultEvent):void
        {
        combosource=XML(event.result);
        CentreCombo.dataProvider=combosource..SHORT_NAME;
        }

this is for combo box..

On Fri, Sep 26, 2008 at 3:14 PM, HISSAM <[EMAIL PROTECTED]> wrote:

> Thanks girish for the idea
> but can u also put some light on how to retrieve this info at the flex
> end??
>
> how to assign the values as an array to a dataprovider of a component
>
> here-is my webservice code
>
> [WebMethod]
>     public string get2LevelColors(string strCategory)
>     {strCategory="blues & greens";
>         string strConnectionString = 
> "server=192.168.1.100;uid=hissam;pwd=dd;database=img;";//
> ConfigurationManager.AppSettings["DatabaseConnectionString"];//"server=
> 192.168.1.100;uid=hissam;pwd=database;database=adstorage;";
>
>         string strQuery = "select distinct Level2filter as colors "
>                            + " from assets "
>                            + " where Level2filter!='null' and
> type='texture' and category='" + strCategory + "';";
>         string strResultLevelColors = "";
>
>         MySqlConnection objCon = null;
>         MySqlCommand objCom = null;
>         //MySqlDataReader objResult = null;
>         DataSet objDataSet = null;
>         MySqlDataAdapter objDataAdapter = null;
>
>         try
>         {
>             objCon = new MySqlConnection(strConnectionString);
>             objCon.Open();
>             objCom = new MySqlCommand(strQuery, objCon);
>             objDataAdapter = new MySqlDataAdapter();
>             objDataSet = new System.Data.DataSet();
>             objDataAdapter.SelectCommand = objCom;
>             objDataAdapter.Fill(objDataSet, "ColorTable");
>             objDataSet.DataSetName = "ColorsDataSet";
>
>
>
>         }
>         catch (Exception e)
>         {
>
>         }
>         finally
>         {
>             try
>             {
>                 if (objCon != null)
>                     objCon.Close();
>             }
>             catch
>             {
>                 //System.err.println("Exception: " + e.getMessage());
>                 // e.printStackTrace();
>             }
>         }
>         string s=objDataSet.GetXml();
>         return s;
>     }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to