When I retrieve image from mysql longblob field to vb.net picturebox I am getting an error.. pls help..
Dim SqlString As String = "select image from employeesmaster where name='VENU'"
Dim cmd As New MySqlCommand(SqlString, MyConnection)
Dim ImageData As Byte() = DirectCast(cmd.ExecuteScalar(), Byte())
'Dim ms As New IO.MemoryStream(ImageData)
If Not ImageData Is Nothing Then
Dim ms As New IO.MemoryStream(ImageData)
Me.PictureBox1.Image = Image.FromStream(MS)
Me.PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
Else
MsgBox("no pict")
End If
print scrn image of error attached...