jeudi 17 septembre 2015

Android DB: delete() API not returning number of rows deleted

I have the following function:

public int deleteRow(String id){
    int rows = 0;

        rows = dB.delete("TABLE_NAME", "ID=?", new String[] {id});

    return rows;
}

Now i am passing a valid id which exits in the table. The row is deleted but rows is still returned as 0.

Could someone please help? Thanks

Aucun commentaire:

Enregistrer un commentaire