My problem is that when I try to change my password, I get this error:
No Value given for one or more parameters
My code:
try
{
connectionn.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = connectionn;
string query = "update LOGIN set pass='" + Npassword.Text + "' WHERE [email protected]";
command.CommandText = query;
command.ExecuteNonQuery();
MessageBox.Show("Password Changed");
connectionn.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error, fill the fields required" + ex);
connectionn.Close();
}
visual-studiotag should only be used for questions relating to the Visual Studio application, not code you write with it.@Npassword.Textis a parameter that the query expects you to pass a value for.LOGIN.passto the same value that it already has. It would be rather unusual to select the row to update based on it's password value. You'd normally want to select the row using a userid or such.