Aditya Chawla's Profile

About

 
Points: 3

Contact

 

Aditya Chawla  >>  Bucky Roberts
July 8, 2016 · Public

Hey bucky

I followed your android studio tutorials and whenever I try to delete something from my database, the app freezes. here's the code:

public void deleteLocation(int id){
SQLiteDatabase db = this.getWritableDatabase();
db.delete(TABLE_LOCATIONS,"id = ?",new String[] {Integer.toString(id)});
db.close();
}

What's wrong with it?
btw Shout out to you for all you have done for the programming community.

Aditya Chawla
July 8, 2016 · Public

Hey bucky

I followed your android studio tutorials and whenever I try to delete something from my database, the app freezes. here's the code:

public void deleteLocation(int id){
SQLiteDatabase db = this.getWritableDatabase();
db.delete(TABLE_LOCATIONS,"id = ?",new String[] {Integer.toString(id)});
db.close();
}

What's wrong with it?
btw Shout out to you for all you have done for the programming community.