samedi 23 mai 2015

Update query not updating the column sqlite android

In my app when the activity is destroyed i want to update a coloumn value to 0.For that i have written the query but it seems not working for me , cos when ever i start the app i get the same old values.

Code

public void resetSelectOptions() {

        database = DatabaseManager.getInstance().openDatabase();
        String query = "Update " + TableName + " SET " + Selected_Option + "=0";

        try {
            database.rawQuery(query, null);
        } catch (SQLiteException e) {

        }
        DatabaseManager.getInstance().closeDatabase();

    }

Please do help me out

Aucun commentaire:

Enregistrer un commentaire