title: Cant delete row from sqlite database android
body: <p>im trying to delete a row from my sqlite database.</p>
  
  <p>My Handler class:</p>
  
  <pre><code>// Deleting single contact
      public void deleteContact(WhiteList contact) {
          SQLiteDatabase db = this.getWritableDatabase();
          db.delete(TABLE_CONTACTS, KEY_ID + " = ?",
                  new String[] { String.valueOf(contact.getID()) });
          db.close();
      }
  
   // Deleting single contact
      public void deleteTitle(int name) 
      {
          try {
          SQLiteDatabase db = this.getWritableDatabase();
          db.delete(TABLE_CONTACTS, KEY_ID + "=" + name, null);
          Log.d("workingasdfasdfasdf", "deleted: " + name);
          db.close();
          }
          catch (Exception e){
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>I tried both but non of them are working.</p>
  
  <p>I call the code: <code>db.deleteTitle(1); //delete record with the ID of "1"</code> onClick of an button</p>
  
  <p>Any help is much appreciated! </p>