I'm trying to update a certain row in my SQLite table but it just won't work.
Here's the method for updating it:
public void setMarkerDone(DestinationMarker destinationMarker) {
String query = "UPDATE " + DatabaseManager.MARKER_TABLE_NAME
+ " SET " + DatabaseManager.MARKER_STATUS + "=" + DatabaseManager.MARKER_STATUS_INACTIVE
+ " WHERE " + DatabaseManager.MARKER_ID + "=" + destinationMarker.getId() + ";";
Log.i("TAG", query);
open();
sqLiteDatabase.rawQuery(query, null);
close();
}
This is Log output when I call this method:
I/TAG﹕ UPDATE marker SET status=0 WHERE id=1;
W/SQLiteConnectionPool﹕ A SQLiteConnection object for database '/data/data/com.matejhacin.travelbuddy/databases/TravelBuddy' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
Which I don't understand because as you can see, I am closing the database, it shouldn't be leaking.
And the SQL is formed correctly (see log output first line)
The app doesn't crash or aynthing, it just doesn't change the row in my SQLite table.
Aucun commentaire:
Enregistrer un commentaire