title: Delete from SQLite Database
body: <pre><code>public void delete(String title)
  {
       db.delete(TABLE_NAME, TITLE+"='"+title+"'", null);
  }
  </code></pre>
  
  <p>Ive used the above code for delete in Sqlite in android</p>
  
  <p>Delete does not take place.</p>
  
  <p>This is the code i am using in the Activity:</p>
  
  <pre><code>deleteRow = deleteTitle.toString();
  
      submit.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              handler = new Assignments(getBaseContext());
              handler.open();
              try
              {
                  handler.delete(deleteRow);
                  Toast.makeText(getBaseContext(), "Data Deleted", Toast.LENGTH_LONG).show();
              }
              catch (Exception e)
              {
                  e.printStackTrace();
                  Toast.makeText(getBaseContext(), "Error", Toast.LENGTH_LONG).show();
              }
              handler.close();
          }
      });
  </code></pre>
  
  <p>it goes into the try block and i get the toast of data deleted but actual delete does not take place</p>