title: Android: Issue with updating the table field
body: <p>I am wonder about how to update the table.</p>
  
  <p>I have use below two method to update the Table.</p>
  
  <p>Which one is right one and Whats wrong in it ?
  As i got the Exception while use both.</p>
  
  <p>Code:</p>
  
  <pre><code>//First One For Update
  public boolean setFavouriteBook(String id){
      String query = "update Articles set type = 0 Where address = '"+id+"'";
      myDataBase.rawQuery(query, null);
      return true;
  }
  
  // Second One for Update
  //---updates a title---
  public boolean setFavourite(String address) 
  {
      ContentValues args = new ContentValues();
      args.put("type", 0);
  
      return myDataBase.update("Articles", args, "address = '"+address+"'", null) &gt; 0;
  }
  </code></pre>
  
  <p>And the Log is:</p>
  
  <pre><code>    02-08 10:29:56.010: INFO/Database(10350): sqlite returned: error code = 8, msg = prepared statement aborts at 28: [UPDATE Articles SET type=? WHERE address = '3']
  02-08 10:29:56.010: ERROR/Database(10350): Error updating type=0 using UPDATE Articles SET type=? WHERE address = '3'
  02-08 10:29:56.021: DEBUG/AndroidRuntime(10350): Shutting down VM
  02-08 10:29:56.021: WARN/dalvikvm(10350): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350): FATAL EXCEPTION: main
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350): android.database.sqlite.SQLiteException: error code 8: attempt to write a readonly database
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:55)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1692)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1622)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at com.project.SkadebogenApp.DataBaseHelper.setFavourite(DataBaseHelper.java:417)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at com.project.SkadebogenApp.CommonWebViewActivity.onClick(CommonWebViewActivity.java:204)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.view.View.performClick(View.java:2408)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.view.View$PerformClick.run(View.java:8816)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.os.Handler.handleCallback(Handler.java:587)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.os.Handler.dispatchMessage(Handler.java:92)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.os.Looper.loop(Looper.java:123)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at android.app.ActivityThread.main(ActivityThread.java:4627)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at java.lang.reflect.Method.invokeNative(Native Method)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at java.lang.reflect.Method.invoke(Method.java:521)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  02-08 10:29:56.041: ERROR/AndroidRuntime(10350):     at dalvik.system.NativeStart.main(Native Method)
  02-08 10:29:56.071: WARN/ActivityManager(59):   Force finishing activity com.project.SkadebogenApp/.CommonWebViewActivity
  02-08 10:29:56.600: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{450b78f8 com.project.SkadebogenApp/.CommonWebViewActivity}
  </code></pre>