title: storing string with ' in sqlite
body: <p>i have a problem with sqlite. in my app i get voice recognition to edit text and then storing this string in sqlite.
  its work very good, the problem is when i try to say word like "don't" and try to save it to sqlite, the app crash becouse its exeption for sqlite. 
  any solution? </p>
  
  <p>this is the on activity result for voice recognition: </p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      switch (requestCode) {
      case REQ_CODE_TAG_INPUT: {
          if (resultCode == RESULT_OK &amp;&amp; null != data) {
              ArrayList&lt;String&gt; result = data
                      .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
              if (!result.get(0).equals("delete all")) {
                  et1.setText(et1.getText().toString() + " " + result.get(0));
              } else {
                  et1.setText("");
              }
          }
          break;
      }
  </code></pre>
  
  <p>and this is the save method for sqlite:</p>
  
  <pre><code>if (!et1.getText().toString().equals("")
              &amp;&amp; !et2.getText().toString().equals("")) {
          tag = et1.getText().toString();
          des = et2.getText().toString();
          Notes.getInstance().getmNotes()
                  .add(new MyNote(tag, des, date, 1, id));
          MyOH oh = new MyOH(getApplicationContext());
          mDb = oh.getWritableDatabase();
          if (MainActivity.state == 1) {
              mDb.execSQL("UPDATE note SET tag='" + tag + "',des='" + des
                      + "',time='" + date + "',noteid=" + id
                      + " WHERE noteid = " + id);
          } else {
              mDb.execSQL("INSERT INTO note VALUES ('" + tag + "','" + des
                      + "','" + date + "'," + id + ")");
          }
  </code></pre>
  
  <p>this is the exeption:</p>
  
  <p>Caused by: android.database.sqlite.SQLiteException: near "t": syntax error (code 1): , while compiling: INSERT INTO note VALUES ('No Tag','don't','28/11/2014',-133663026</p>
  
  <p>thanks for helping!!</p>