Code example for SQLiteDatabase

Methods: execSQLisOpenisReadOnly, close

0
	} 
	 
	public static void insertManifest(String[] values) {
		try { 
			SQLiteDatabase db = storeHelper.getWritableDatabase();
			db.execSQL("INSERT OR REPLACE INTO manifest VALUES(?, ?)", values);		
			db.close();
 
		} catch (SQLException e) {
			OpenFeintInternal.log("SQL", e.toString());
		} 
	} 
 
 
	public static final String DBNAME = "manifest.db";
	private static final int VERSION = 2;
	private static final String DBPATH = "/openfeint/webui/manifest.db";
	public static class DataStorageHelperX extends SQLiteOpenHelperX { 
		DataStorageHelperX(Context context) {
	        super(new DataStorageHelper(context));
	    } 
		DataStorageHelperX(String path) {
	        super(path, VERSION);
	    } 
 
	    @Override 
	    public void onCreate(SQLiteDatabase db) {
	        db.execSQL("CREATE TABLE manifest (PATH TEXT PRIMARY KEY, HASH TEXT);");
	        db.execSQL("CREATE TABLE store (ID TEXT PRIMARY KEY, VALUE TEXT);");
	    } 
	     
	    @Override 
	    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	    	if (oldVersion == 1) {
		        db.execSQL("CREATE TABLE store (ID TEXT PRIMARY KEY, VALUE TEXT);");
	    	} 
	    } 
	} 
	 
	public static class DataStorageHelper extends SQLiteOpenHelper {
 
	    DataStorageHelper(Context context) {