public static void UpgradeTable(SQLiteDatabase db, int oldVersion, int newVersion) { Log.v( new Throwable(), "Uprading DownloadedItem table from " + oldVersion + " to " + newVersion); if (oldVersion != newVersion) { db.execSQL(DROP_TABLE); CreateTable(db); } // db.close(); } // UpgradeTable
public Cursor Select() { SQLiteDatabase rdb = getReadableDatabase(); Log.v(new Throwable(), "Selecting all records."); return rdb.query( TABLE_NAME, new String[] {"_id", COLUMN_DOWNLOADED_DATE, COLUMN_DOWNLOADED_FILE}, null, null, null, null, COLUMN_DOWNLOADED_DATE); } // Select
public static void CreateTable(SQLiteDatabase db) { Log.v(new Throwable(), CREATE_TABLE); db.execSQL(CREATE_TABLE); // db.close(); } // UpgradeTable