title: updating the values in android database
body: <p>I have a settings tab in my application which takes an int value through edittext from user and stores it into the database. When the user now wants to change the setting the old setting should be updated in the database. How do I write the database code for that. </p>
  
  <p>Below is my code to save the value in db:</p>
  
  <pre><code>DatabaseHelper dha = new DatabaseHelper(this);
             SQLiteDatabase db = dha.getWritableDatabase();
             Log.d("","Done with database Sqlite");
             ContentValues cv = new ContentValues();
             EditText editText2 = (EditText) this.findViewById(R.id.editText1);
             setTime = editText2.getText().toString(); 
             Log.d(setTime, "This is the setTime value");
             cv.put(DatabaseHelper.TIME, setTime);
             db.insert("finalP", DatabaseHelper.TIME, cv);
             db.close();
  </code></pre>