1 Reply Latest reply on Sep 2, 2010 3:52 AM by TB_DK

    Database result populates wrong table in Flex

    TB_DK

      Dear all,

       

      when I try to populate two datagrids with results from two different methods in a web service I have to problem that the rows returned by the second call are assigned to the table of the first call. Let me explain:

       

      I have two DataGrids and a web service connecting to a MSSQL database. The web service has two methods, first 'getInstruments(), second 'getOwner()'.

      They work fine if I use them separately and return the content of the table 'Instruments' respectively 'Owner'. However, when I put two DataGrids on the stage and assign the first method to the first DataGrid, save and run the application it works. As soon as I bind the second method to the second DataGrid it is overwriting the content of the first table with the content of the second (column 2, image 2). The code for the second dataprovider goes also wrong and after adjusting it manually only the second DataGrid shows data, although the first DataGrid has a scrollbar, indicating that there should be something visible. As you can see in the last image in column two 'GetOwnerResults' now includes the 'Instrument' table and the content changed from 'ins*' to 'onr*' while the table 'Owner' doesn't contain anything....

       

      I just don't get it to work. Please see the screenshots i took from the procedure.

       

      method_1.jpgmethod_1_rows.jpgstructure_method_1.jpg

      method_2.jpgmethod_2_rows.jpgstructure_method_2.jpg

       

      Thanks Thomas