hi,
Good day everyone, I have a problem to directly retrieve binary data from sql server , please help.
How to direct retrieve binary value from sql server using csharp?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 21, 2011, 4:57 AM EST
Please refer the below link
http://www.codeproject.com/KB/database/SqlFileStream.aspx
Thanks
Sam HobbsRank #107 · 20.5K reputationPosted Nov 21, 2011, 1:30 PM EST
Manoj SevdaRank #1,670 · 916 reputationPosted Nov 21, 2011, 10:46 PM EST
if (dt.Rows[0]["Photo"].ToString() != "")
{
MemoryStream m = new MemoryStream(dt.Rows[0]["Photo"].ToString(), true);
picPhoto.Image = Image.FromStream(m);
m.Close();
}