I am trying to delete the all record from the table in database, but I cannot delete. Can anybody help me?
I am using this link Delete
public void delete()
{
String DELETEPASSCODE_DETAIL = "DELETE * FROM Payment;";
db.execSQL(DELETEPASSCODE_DETAIL);
}
am calling the delete function here
private void savepay() {
// TODO Auto-generated method stub
try{
String check;
webService calService=new webService();
dh.open();
Cursor c = dh.pay();
Toast.makeText(getBaseContext(),className+c.getString(1)+c.getString(2)+c.getString(3)+c.getString(4),Toast.LENGTH_LONG).show();
check= calService.paymentReceipt("PaymentReceipt",c.getString(1),c.getString(2),c.getString(3),c.getString(4),c.getString(5),"0");
}
while (c.moveToNext());
dh.delete();//here i called delete function
dh.close();
}