I am attempting to update an item in my table and it is not working, I keep getting this error "no value given for one or more required parameters"
I know it's not my connection settings to the Access MDB database as I've been able to communicate with it already. Here is my function:
Public Sub UpdateDB(ByVal dbTable As String, ByVal updateColumn As String, ByVal updateItem As String, ByVal keyCol As String, ByVal keyItem As String)
'Update items in DB
aCommand.CommandType = CommandType.Text
aCommand.CommandText = String.Format("UPDATE {0} SET {1} = '{2}' WHERE {3} = {4}", dbTable, updateColumn, updateItem, keyCol, keyItem)
aCommand.Connection = aConnection
aConnection.Open()
'MsgBox(aCommand.CommandText)
Try
aCommand.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
aConnection.Close()
End Sub
And my function call: VMD.UpdateDB("Bushing", "Length", "0.98123", "FileName", "Bushing1")
Thanks, any other info needed just let me know.
Edit: Picture of my table: