title: Record is not getting update in database
body: <p>I have saved data in database. I am trying to update data. 
  But record is not getting update. </p>
  
  <p>If I debug the update function it shows the values i have entered. But when I retrieve the data it dose not show updated values.</p>
  
  <p>What's wrong? </p>
  
  <p>update function in helper class</p>
  
  <pre><code>public int updateEvent(EventData event) {
      SQLiteDatabase db = this.getWritableDatabase();
  
      ContentValues values = new ContentValues();
      values.put(KEY_TITLE,event.getTitle());
      values.put(KEY_FROM_DATE,event.getFromDate());
      values.put(KEY_TO_DATE,event.getToDate());
      values.put(KEY_DAY_OF_WEEK,event.getDayOfWeek());
      values.put(KEY_LOCATION,event.getLocation());
      values.put(KEY_NOTIFICATION_TIME,event.getNotificationTime());
  
  
      // updating row
      return db.update(TABLE, values, KEY_ID + " = ?",
             new String[] { String.valueOf(event.getId()) });
  
  }
  </code></pre>
  
  <p>updating in activity:</p>
  
  <pre><code> if (editMode) {
  
                      eventData.setTitle(title.getText().toString());
                      eventData.setFromDate(showFromTime.getText().toString());
                      eventData.setToDate(showToTime.getText().toString());
                      eventData.setDayOfWeek(selectDay.getText().toString());
                      eventData.setLocation(mAutocompleteView.getText().toString());
                      eventData.setNotificationTime(notifyTime.getText().toString());
  
                      db.updateEvent(eventData);
                  }
                  else {
                      db.addEvent(new EventData(eventTitle, startTime, endTime, dayOfWeek, location, notificationTime));
  
                  }
                  setResult(RESULT_OK, i);
  
                  finish();
  
              }
  </code></pre>
  
  <p>Thank you..</p>