VB.net Save image from memory stream
Posted on 2014-07-27
How do I modify the following code to rather save the image as an image file on my hard drive
Dim oID As String = D.Rows(r).Cells(1).Value
Dim sSQL As String = "Select Photo from Photos where ID = " & oID & ""
Dim cmd2 As New SqlCommand(sSQL, con)
Dim ImgStream As New IO.MemoryStream(CType(cmd2.ExecuteScalar, Byte()))
PictureBox1.Image = System.Drawing.Image.FromStream(ImgStream)