Retrieve and Display Image
How do i retrieve and display an Image in a picturebox from SQL Server Database.
I tried using the code below.
I got the error "Cast from type 'Byte() to type 'String' is not valid"
code:
Try
Connect()
jesacon.Open()
jesacmd = New SqlCommand("SELECT PER_SIGN FROM PER_INFO_SIGN WHERE PER_NAME = '" & CheqOwnerComboBox.SelectedItem.ToString & "'", jesacon)
jesadr = jesacmd.ExecuteReader
While jesadr.Read
DisplaySignPictureBox.Image.FromFile(jesadr(0))
End While
Catch ex As Exception
MsgBox(ex.Message)
End Try
I just can't understand how to get this work.
|