locked
ASP.Net Create physical image from binary data in Sybase RRS feed

  • Question

  • User567269486 posted

    I want to extract an image from a third party Sybase table which has binary data in it.

    To store images they use the following query:

    SELECT xp_write_file('C:\photo-1.gz', col_name) FROM tbl_name

    What I am trying to do is convert the binary data stored to a actual physical file using .Net

    Any help would be appreciated.


    Thursday, November 18, 2010 4:59 AM

Answers

  • User567269486 posted

    The Sybase function xp_write_file function stores the image as a base64 string.

    The function Convert.FromBase64String did the trick for me.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 24, 2010 6:37 AM