Created
March 1, 2014 19:47
-
-
Save msdalp/9296041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyDb extends SQLiteOpenHelper { | |
public static final String TAG = "MyDb"; | |
public static final int VERSION = 1; | |
public static final String DATABASENAME = "mydb"; | |
public MyDb(Context context) { | |
super(context, DATABASENAME, null, VERSION); | |
} | |
@Override | |
public void onCreate(SQLiteDatabase db) { | |
db.execSQL("CREATE TABLE IF NOT EXISTS data" + | |
+ " (ID INTEGER PRIMARY KEY, " | |
+ "DATA_ID TEXT, " | |
+ "VALUE TEXT);"); | |
} | |
@Override | |
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment