document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package com.baruberbagi.catatan;
  2.  
  3. import android.content.Context;
  4. import android.database.sqlite.SQLiteDatabase;
  5. import android.database.sqlite.SQLiteOpenHelper;
  6.  
  7. public class DatabaseOpenHelper extends SQLiteOpenHelper {
  8.     public static final String DATABASE = "memos.db";
  9.     public static final String TABLE = "memo";
  10.     public static final int VERSION = 1;
  11.  
  12.     public DatabaseOpenHelper( Context context) {
  13.         super(context, DATABASE, null, VERSION);
  14.     }
  15.  
  16.     @Override
  17.     public void onCreate(SQLiteDatabase db) {
  18.         db.execSQL("CREATE TABLE memo(date INTEGER PRIMARY KEY, memo TEXT);");
  19.     }
  20.  
  21.     @Override
  22.     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
  23.  
  24.     }
  25. }
  26.  
');