Hi!
I’m trying to save a local document stored in SQL db.
From execute query activity i get dt with one column(“Data”) - varbinary type…
If i’m not wrong somehow i need to transform the dt.rows(0)(“Data”) (studio is interpreting as object) to an array of bytes.
I used invoke code but the file is broken
Dim _MemoryStream As New System.IO.MemoryStream()
Dim _BinaryFormatter As New System.Runtime.Serialization.Formatters.Binary.BinaryFormatter()
_BinaryFormatter.Serialize(_MemoryStream, inputObj)
_MemoryStream.ToArray()
File.WriteAllBytes(“C:\Users\Desktop\test.tiff”, _MemoryStream.ToArray())
Please help!
Thanks!