I am working on a database management system. I have a simple task of updating user profile. I created an asp.net page with textboxes and a save button. After adding the tex
Add the parameter values in the same order as the parameter names appear in the UPDATE
statement.
cmd.Parameters.AddWithValue("@firstName", firstName);
cmd.Parameters.AddWithValue("@lastName", lastName);
cmd.Parameters.AddWithValue("@Gender", Gender);
cmd.Parameters.AddWithValue("@Address", sAddress);
cmd.Parameters.AddWithValue("@Telephone", sTelephone);
cmd.Parameters.AddWithValue("@Course", sCourse);
cmd.Parameters.AddWithValue("@Email", sEmail);
cmd.Parameters.AddWithValue("@UserName", User.Identity.Name);
OleDb with Access does not pay attention to the parameter names, only their order.