From 7b4218779b7931e9016047efa48e09ff9b91e7f6 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 15 Dec 2017 14:25:25 +0200 Subject: [PATCH] Specify columns to insert --- .../plus/mapmarkers/MapMarkersDbHelper.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java index 3cab3d6b15..3f36a66d48 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersDbHelper.java @@ -365,7 +365,21 @@ public class MapMarkersDbHelper { "WHERE " + MARKERS_COL_NEXT_KEY + " = ?", new Object[]{marker.id, TAIL_NEXT_VALUE}); } - db.execSQL("INSERT INTO " + MARKERS_TABLE_NAME + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + db.execSQL("INSERT INTO " + MARKERS_TABLE_NAME + " (" + + MARKERS_COL_ID + ", " + + MARKERS_COL_LAT + ", " + + MARKERS_COL_LON + ", " + + MARKERS_COL_DESCRIPTION + ", " + + MARKERS_COL_ACTIVE + ", " + + MARKERS_COL_ADDED + ", " + + MARKERS_COL_VISITED + ", " + + MARKERS_COL_GROUP_NAME + ", " + + MARKERS_COL_GROUP_KEY + ", " + + MARKERS_COL_COLOR + ", " + + MARKERS_COL_NEXT_KEY + ", " + + MARKERS_COL_DISABLED + ", " + + MARKERS_COL_SELECTED + ") " + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new Object[]{marker.id, marker.getLatitude(), marker.getLongitude(), descr, active, currentTime, visited, marker.groupName, marker.groupKey, marker.colorIndex, marker.history ? HISTORY_NEXT_VALUE : TAIL_NEXT_VALUE, 0, 0});