这段代码有什么问题??我遇到了 GDI+ 错误,我不知道如何解决。
Private Sub saveEmployee()
Dim ms As New MemoryStream
PictureBox1.Image.Save(ms, PictureBox1.Image.RawFormat)--i got error in this line..A generic error occurred in GDI+.
Dim arrPic() As Byte = ms.GetBuffer()
Dim cmdEmp As New MySqlCommand
Dim sqlEmp As String
sqlEmp = "update tbl_employee set emPic=@emPic where emID='" & lbl_empID.Text & "'"
With cmdEmp
.Parameters.AddWithValue("@emPic", arrPic)
.ExecuteNonQuery()
End With
End Sub