The update simply doesn't work, the row stays the same .I get no error.Does anyone know the reason why it doesn't work ? I'd like to know firstly the cause of the problem but if you have any ideas, suggestions about how to improve my code, they we'll be welcomed.
private void button2_Click(object sender, EventArgs e)
{
using (SqlConnection conn = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=E:\C #\InsertDeleteUpdate-Login\InsertDeleteUpdate-Login\Database1.mdf;Integrated Security=True"))
using (SqlCommand cmd = new SqlCommand("UPDATE info SET Password=@Password WHERE Id=@Id AND Password=@Password1",conn))
{
conn.Open();
cmd.Parameters.AddWithValue("@Password", textBox4.Text);
cmd.Parameters.AddWithValue("@Id", textBox3.Text);
cmd.Parameters.AddWithValue("@Password1", textBox2.Text);
}
}