Error: No value given for one or more required parameters

Hello

Receving the following error at the moment
No value given for one or more required parameters

Attempting to access an Access database with the book “Build your own ASP.NET Website using C# and VB.NET. If you have this book I am on page 284.

The code I am having problems with is as follows:

Sub UpdateEmployee(s As Object, e As Eventargs)

objCmd = New OleDbCommand(“UPDATE Employees SET Name=@Name, Username=@Username, Address=@Address, City=@City, State=@State, Zip=@Zip, HomePhone=@HomePhone, Extension=@Extension, MobilePhone=@MobilePhone WHERE EmploeeID=@EmployeeID” , objConn) objCmd.Parameters.Add(“@EmployeeID”, ddlEmployees.SelectedItem.Value) objCmd.Parameters.Add(“@Name”, txtName.Text)
objCmd.Parameters.Add(“@Username”, txtUsername.Text) objCmd.Parameters.Add(“@Address”, txtAddress.Text)
objCmd.Parameters.Add(“@City”, txtCity.Text)
objCmd.Parameters.Add(“@State”, txtState.Text)
objCmd.Parameters.Add(“@Zip”, txtZip.Text)
objCmd.Parameters.Add(“@HomePhone”, txtHomePhone.Text) objCmd.Parameters.Add(“@Extension”, txtExtension.Text) objCmd.Parameters.Add(“@MobilePhone”, txtMobilePhone.Text)
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
End Sub

This code gives me the error but the code from their download page does not update the fields. I am at a total loss. The rest of code works fine but for some reason i am unable to update the access data base, any help is great thanks…

Looks like your error could be here: WHERE EmploeeID=@EmployeeID". You need to add a ‘y’ to EmploeeID.