If you think the Android project student_travel_app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.piasy.simpletravel.dao;
/*www.java2s.com*/import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
publicclass DBHelper extends SQLiteOpenHelper
{
privatestaticfinal String DATABASE_NAME = "PLANS.db";
privatestaticfinalint DATABASE_VERSION = 1;
public DBHelper(Context context)
{
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
public DBHelper(Context context, String name, CursorFactory factory,
int version)
{
super(context, name, factory, version);
}
@Override
publicvoid onCreate(SQLiteDatabase db)
{
// db.execSQL("CREATE TABLE IF NOT EXISTS " + PTTConfig.DATABASE_TABLE_NAME +
// "(id INTEGER PRIMARY KEY AUTOINCREMENT, date INTEGER, hotel TEXT, spot TEXT, trafic TEXT)");
}
@Override
publicvoid onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
// db.execSQL("ALTER TABLE records ADD COLUMN other TEXT");
}
}