0 Replies Latest reply on Mar 30, 2008 3:16 PM by Fantasma414

    Get an image from a varbinary field in an SQL Server 2005 database

    Fantasma414
      Hi:
      In a varbinary(MAX) field of an SQL Server 2005 database I storage JPG images. I design a webservice that returns the following XML structure:

      Public Class IMAGEN
      Public ErrorConsulta As Long
      Public Imagen As Byte()
      End Class

      The response look like this:

      <FLEXOBTENERIMAGENResponse>
      <FLEXOBTENERIMAGENResult>
      <IMAGEN>
      <ErrorConsulta>0</ErrorConsulta>
      <Imagen>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgH....</Imagen>
      </IMAGEN>
      </FLEXOBTENERIMAGENResult>
      </FLEXOBTENERIMAGENResponse>

      Where the node Imagen are thousands of caracters that represents the JPG image.
      How can I show this JPG in an Image control of a Flex Builder 2 or 3?

      If you need more information please let me know.
      Thanx in advance.