Why Record is not deleting from sqlite data base in android
<p>*<em>This is my button code when i press del button it display data is not deleting i think my code is 100% correct then it is happening *</em></p>

<pre><code>btndel.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
    try 
    {       
        long num=Long.parseLong(regno.getText().toString());        
        dba.open();
        Boolean check = dba.deleterec(num);
        if (check == true) {
            Toast.makeText(getBaseContext(), "Record Deleted", Toast.LENGTH_LONG).show();
            xmlc.delete(num);
        } else {
            Toast.makeText(getBaseContext(), "Record Not Deleted"Toast.LENGTH_LONG).show();
        }
        dba.close();
    } catch (Exception e) {
    e.printStackTrace();
    }
}

});
</code></pre>

<p><strong>this my data deleting method</strong></p>

<pre><code>public boolean deleterec(long regno) throws Exception
{
    System.out.println("&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;NO for delting of Record"+regno);
    return db.delete(Database_table,KEY_RegNo+"="+regno,null)&gt;0;
}
</code></pre>
