Last post Nov 24, 2010 06:37 AM by tp
Nov 18, 2010 04:59 AM|TP|LINK
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.
Nov 24, 2010 06:37 AM|TP|LINK
The Sybase function xp_write_file function stores the image as a base64 string.
The function Convert.FromBase64String did the trick for me.