4 Replies Latest reply on Oct 20, 2010 12:43 AM by Radhakrishna Bhat

    Data services wrong return type

    Wave cult

      Hello,

       

      I'm using FB4 / CF8 and I'm accessing a Microsoft SQL Server 2008.

      I'm trying to configure a return data type from a .cfc service file.

       

      When I set the return data type using the auto-detect option all my decimal(9,2) fileds are retireved as string field.

       

      How can I solve this problem ?

       

      Thanks,

      Davide Rubbiani

        • 1. Re: Data services wrong return type
          nlk10010

          Oh, man, you too? And no one from Adobe has offered to help you? Gee, what a surprise.

           

          I'm using CFC with a MySQL database and my DECIMAL(5,1) is being returned as a string and I can't change it. My DECIMAL(11,2) fields are returned OK but not the DECIMAL(5,1).

           

          Are ANY of your DECIMAL fields returned properly? If so then try changing the (9,2) to the size of the ones that are detected correctly. I'm going to do that with my (5,1) (i.e. change it to (11,2)) and see what happens.

           

          I'll let you know how it goes.

          • 2. Re: Data services wrong return type
            nlk10010 Level 1

            I just tried changing the data type and it didn't work.

             

            HOWEVER, I THEN set that field to NULL and I got an Object return; i.e. I could set the type.

             

            Now I only have a few records in the database and that field was NULL in all of them save for the first; I don't know which record is tested but I would try setting those fields to NULL in the first record (by that I mean the one with the lowest value in the primary key) and see what happens.

             

            HTH.

            • 3. Re: Data services wrong return type
              Wave cult Level 1

              Hello nlk10010,

               

              at the end I give up with data services. It seems they are good only for the demo you can find on the Internet.

              I try to map the data service on a .cfc service built with the cfc creator of CFB.

              At the beginning everything  seems go right.

              As soon as I need to map a data service on a more complex object (a 1-to-m relationship), despite I'm using a server typed objects, the service try to map the return data on the data presents in the table with the problems I reported before.

              In fact it seems the object subtypes aren't mapped in the right way on the client side too.

               

              So I returned working using remote object via code and manually mapping the server type to the value objects client type.

               

              Pheraps it will be better that Adobe puts more efforts in developing a solid and more business oriented version of Flex.

               

              Thanks for your suggestions,

              Davide

              • 4. Re: Data services wrong return type
                Radhakrishna Bhat Level 3

                Hi,

                 

                I have logged a bug for this to track. https://bugs.adobe.com/jira/browse/FBG-2187

                 

                -Radhakrishna