Error: "Invalid Parameter Used" when i try to display an image [modified]
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I get the error: "Invalid Parameter Used" when i try to display an image I believe this occurs at DisplaySignPictureBox.Image = Image.FromStream(mem) Try Connect() jesacmd = New SqlCommand("SELECT PER_SIGN FROM PER_INFO_SIGN WHERE PER_NAME = '" & CheqOwnerComboBox.SelectedItem.ToString & "'", jesacon) Dim da As New SqlDataAdapter(jesacmd) Dim ds As New DataSet da.Fill(ds, "PER_INFO_SIGN") Dim c As Integer = ds.Tables("PER_INFO_SIGN").Rows.Count If c > 0 Then Dim jbyte() As Byte = ds.Tables("PER_INFO_SIGN").Rows(c - 1)("PER_SIGN") Dim mem As New MemoryStream(jbyte) DisplaySignPictureBox.Image = Image.FromStream(mem) End If Catch ex As Exception MsgBox(ex.Message) End Try jesacon.Close()
modified on Tuesday, September 23, 2008 9:58 AM