title: how to update table data in sql database
body: <p>I am using asp.net for my project , and I am using the following code , but its not working correctly </p>
  
  <pre><code> SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=E:\\WEB_PROJECT\\App_Data\\ASPNETDB.MDF;Integrated Security=True;User Instance=True");
   SqlCommand cmd = new SqlCommand();
   cmd.Connection = con;
   con.Open();
   cmd.CommandText = "UPDATE info SET fname = @fn, lname = @fl, phone= @ph, recoveryq=@rq, recoverya=@ra WHERE username = @un";  
  
   cmd.Parameters.AddWithValue("fn", TextBox3.Text);
   cmd.Parameters.AddWithValue("fl", TextBox4.Text);
   cmd.Parameters.AddWithValue("ph", TextBox5.Text);
   cmd.Parameters.AddWithValue("rq",TextBox6.Text);
   cmd.Parameters.AddWithValue("ra",TextBox2.Text);
   cmd.Parameters.AddWithValue("un",line);        
   cmd.ExecuteNonQuery();
   con.Close();
  </code></pre>
  
  <p>Advice plzz i m confused !!! :(</p>