First thing you have not provide Where clause in update command thats why its updating whole table.
Why are you using
DataAdapter
here.
You can simply use SqlCommand like this:
SqlCommand UpdateCommand = new SqlCommand("UPDATE complain SET Name = @NAME,Email = @EMAIL,Message= @MESSAGE", con);
UpdateCommand.Parameters.Add("@NAME", SqlDbType.NVarChar).Value = nameTextBox.Text;
UpdateCommand.Parameters.Add("@EMAIL", SqlDbType.NVarChar).Value = emailTextBox.Text;
UpdateCommand.Parameters.Add("@MESSAGE", SqlDbType.NVarChar).Value = messageTextBox.Text;
con.Open();
UpdateCommand.ExecuteNonQuery();
con.Close();