在这里需要小帮助
m 试图插入员工的图像(在 EmployeeTable 中)
Protected Sub ImageAddButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ImageAddButton.Click
Dim con As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionString").ToString)
con.Open()
If EmployeeIDTextBox.Text = "" Then
MsgBox("Please Enter EmployeeID to Add Photo")
Else
Dim com As New SqlCommand("UPDATE EmployeeTable SET IMAGE = (@IM) where EmployeeID='" & EmployeeIDTextBox.Text & "'", con)
**Dim imageData As Byte() = File.ReadAllBytes(FileUpload1.FileName)**
com.Parameters.AddWithValue("@IM", imageData)
com.ExecuteNonQuery()
在 ** 中的行出现错误......感谢帮助......