|
import android.content.Context;
import android.database.sqlite.*;
class DBSOpenHandler extends SQLiteOpenHelper {
private static final String TAG = MainActivity.class.getSimpleName();
// name and version of the database
private static final String DATABASE_NAME = "database1.db";
private static final int DATABASE_VERSION = 1;
DBSOpenHandler (Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
} // DBSOpenHandler
|
|
|
public class DBSQueries {
private static final String TAG = MainActivity.class.getSimpleName();
private static String getCreateTables() {
return
" CREATE TABLE Table1 ("+
" PINDEX INTEGER AUTOINCREMENT NOT NULL,"+
" VALUE1 INTEGER DEFAULT 0,"+
" VALUE2 VARCHAR(30) DEFAULT '',"+
" CONSTRAINT Table1 PRIMARY KEY (PINDEX)"+
" );"+
"";
} // getCreateTables"
public static int insertSQL() {
return 0;
}
public static void updateSQL() {
}
public static void deleteSQL() {
}
} // DBSQueries
|
|