title: SQLite Updating
body: <p>I read many many doc and I don't know why my code isn't working.
  I want to update my table and this is my code:</p>
  
  <pre><code>public boolean updateSetting(int id, String cordinates, String ip, String port, String message, String sendTime) {
      SQLiteDatabase db = this.getWritableDatabase();
      ContentValues contentValues = new ContentValues();
      try {
          //contentValues.put(clmKeyId,0);
          if (cordinates!=null) {
              contentValues.put(clmCordinates, cordinates);
          }
          contentValues.put(clmIp, ip);
          contentValues.put(clmPort, port);
          contentValues.put(clmDeviceMessage, message);
          contentValues.put(clmSendTime, sendTime);
      } catch (Exception e) {
          e.printStackTrace();
      }
      int checkUpdate = db.update(tblSetting, contentValues,clmSettingKeyId + " = "+ id,null);
  
      db.close();
          return checkUpdate&gt;0;
      }
  </code></pre>
  
  <p>and this is my calling method:</p>
  
  <pre><code>    DataBaseHelper dataBaseHelper = new DataBaseHelper(this);
          boolean value = dataBaseHelper.updateSetting(0, cordinates, edtIdp.getText().toString().trim(), edtport.getText().toString().trim(), edtMessage.getText().toString().trim(), edtSendTime.getText().toString().trim());
          if (value)
              //doSomthing
  }
  </code></pre>
  
  <p>but my  <code>update Setting</code>method always return 0.
  Please help me.</p>