Error At Displaying An Image
When i try to display an image i get the error:
"Invalid Parameter Used"
This happens at code section:
Dim im As Bitmap = New Bitmap(mem)
Below is the entire code
Try
Connect()
jesacmd = New SqlCommand("SELECT PER_SIGN FROM PER_INFO_SIGN WHERE
PER_NAME = '" & CheqOwnerComboBox.SelectedItem.ToString & "'",
jesacon)
jesacon.Open()
Dim imagedata() As Byte = CType(jesacmd.ExecuteScalar(), Byte())
Dim mem As MemoryStream = New MemoryStream(imagedata)
Dim im As Bitmap = New Bitmap(mem)
DisplaySignPictureBox.Image = im
Catch ex As Exception
MsgBox(ex.Message)
End Try
jesacon.Close()
Thanks
|