public void createTables(ConfigDatabaseOperations cdo) { try { cdo.getWritableDatabase().execSQL(createConfigTableQuery); Log.d(" String ", createConfigTableQuery); } catch (Exception e) { Log.d(" Error ", e.getMessage()); } finally { cdo.close(); } }
public void addNewTimeConfig( ConfigDatabaseOperations tcdop, int id, String time, String eTime, String mode, String sunday, String monday, String tuesday, String wednesday, String thursday, String friday, String saturday, String name, boolean active) { try { SQLiteDatabase sqlitedb = tcdop.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ConfigTableData.TimeConfigTableInfo.Etime, eTime); cv.put(ConfigTableData.TimeConfigTableInfo.id, id); cv.put(ConfigTableData.TimeConfigTableInfo.time, time); cv.put(ConfigTableData.TimeConfigTableInfo.mode, mode); cv.put(ConfigTableData.TimeConfigTableInfo.SunDay, sunday); cv.put(ConfigTableData.TimeConfigTableInfo.MonDay, monday); cv.put(ConfigTableData.TimeConfigTableInfo.TuesDay, tuesday); cv.put(ConfigTableData.TimeConfigTableInfo.WednesDay, wednesday); cv.put(ConfigTableData.TimeConfigTableInfo.ThursDay, thursday); cv.put(ConfigTableData.TimeConfigTableInfo.FriDay, friday); cv.put(ConfigTableData.TimeConfigTableInfo.SaturDay, saturday); cv.put(ConfigTableData.TimeConfigTableInfo.name, name); cv.put(ConfigTableData.TimeConfigTableInfo.active, active); dbHelper.addRow(sqlitedb, ConfigTableData.TimeConfigTableInfo.Config_Table, cv); } catch (Exception e) { } finally { tcdop.close(); } }
public void dropDB(ConfigDatabaseOperations cdo) { cdo.getWritableDatabase() .execSQL("DROP TABLE IF EXISTS " + ConfigTableData.TimeConfigTableInfo.USER_INFODB); }