Help me to solve this problem
Conversion from string "LastName" to type 'Double' is not valid.
Private Sub ButtonAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Try
Call OpenConnection()
With OleDa
.UpdateCommand = New OleDb.OleDbCommand()
.UpdateCommand.CommandText = "UPDATE [INVENTRY] SET [ItemCode] = @ItemCode , [ItemName] = @ItemName , [QTY] = @QTY , [SalePrice] = @SalePrice , [PurchasePrice] = @PurchasePrice WHERE (EmployeeID = ?)"
.UpdateCommand.Connection = OleCn
.UpdateCommand.Parameters.Add("@ItemCode", OleDb.OleDbType.VarWChar, 50, "ItemCode").Value = ListView1.Items(0).Text
.UpdateCommand.Parameters.Add("@ItemName", OleDb.OleDbType.VarWChar, 50, "ItemName").Value = ListView1.Items(0).SubItems(2).Text
.UpdateCommand.Parameters.Add("@QTY", OleDb.OleDbType.VarWChar, 50, "QTY").Value = "QTY" - ListView1.Items(0).SubItems(3).Text
End With
Call CloseConnection()
MsgBox("Record(s) has been Updated...", MsgBoxStyle.Information, "Record(s) Updated...")
Me.Close()
Catch ex As Exception
MsgBox("Unable to update record(s), Employee ID already exist, please enter another Employee ID...", MsgBoxStyle.Exclamation, "Attention...")
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error...")
Call CloseConnection()
End Try
End Sub