Pictogram 1.6, beta 8, issue #448

parent 3ab2912f
......@@ -254,6 +254,7 @@ public class PCBDBHelper extends SQLiteOpenHelper {
values.put("id_stu", id_stu);
int n=0;
for (Picto picto : vocabulary_grid) {
n++;
values.put("id_picto", picto.get_ImgId());
values.put("id_grid", picto.get_grid());
......@@ -262,8 +263,7 @@ public class PCBDBHelper extends SQLiteOpenHelper {
values.put("url", picto.get_url());
values.put("translation",picto.get_translation());
values.put("attributes",picto.get_json_attrs());
db.delete("collection_detail","id_grid="+picto.get_grid()+" and id_picto="+ picto.get_ImgId(),null);
db.insertWithOnConflict("collection_detail", null, values,SQLiteDatabase.CONFLICT_ABORT);
db.insertWithOnConflict("collection_detail", null, values,SQLiteDatabase.CONFLICT_REPLACE);
}
Log.i(LOG_TAG,"Storage "+n+" pictos for student "+id_stu);
//db.close(); <--no es necesario cerrar la bbdd https://groups.google.com/forum/#!msg/android-developers/NwDRpHUXt0U/jIam4Q8-cqQJ
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment