2 Replies Latest reply on Jul 5, 2012 10:34 PM by megharajdeepak

    Passing flex byteArray to .NET MS SQL

    megharajdeepak Level 1

      Hello there,

      I'm trying to pass an encoded image as byteArray to .NET backend. The .NET method uses byte[] as datatype to accept byteArray from flex. Flex byteArray variable is fine until it reaches the webservice, it's total lenth is 1540. But when it tries to insert to DB table, it truncates the data and saves only first 256 characters!!


      Am I missing something? If yes, it would be great if someone can let me know the right to to save byteArray datatype into MS SQL DB via webservice.


      Appreciate your help..




        • 1. Re: Passing flex byteArray to .NET MS SQL

          Being a .NET guy myself, judging from what you've posted, it sounds like you've got something messed up with your SQL data type, probably in your table or stored procedure.


          From what you're saying, it sounds like the byteArray is fine from the Flex side of things, correct? You're passing it into a web service (at which point, its fine), but then once it leaves the web service for your database, its getting messed up in the SQL INSERT statement?    

          • 2. Re: Passing flex byteArray to .NET MS SQL
            megharajdeepak Level 1

            Well, eventually the byte data was getting saved properly and completely in DB. But when I ran the query in console, unfortunately it was just showing first 256 characters! And I kept thinking that it's saving only so much in DB


            When I passed this data back from DB to flex, I did got what I had passed earlier and I was able to recreate the image out of it