X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Funical%2FMySQLiteHelper.java;h=dbadca58e89af64f5497ccff38c71824c9c9de64;hb=88ba7fcfc7c85332347b4cf4ff684dd0c34fd7a4;hp=dc3595157db2a37f9040b810d286a2f90b290b54;hpb=819197b2305a94ab4924c5ae37a3fad762078448;p=unical.git diff --git a/src/ro/ieval/unical/MySQLiteHelper.java b/src/ro/ieval/unical/MySQLiteHelper.java index dc35951..dbadca5 100644 --- a/src/ro/ieval/unical/MySQLiteHelper.java +++ b/src/ro/ieval/unical/MySQLiteHelper.java @@ -1,10 +1,7 @@ package ro.ieval.unical; -import java.sql.SQLClientInfoException; - import android.content.Context; import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; @@ -23,7 +20,8 @@ public class MySQLiteHelper extends SQLiteOpenHelper { private static final int dbversion=1; private static final String Database_create = "create table " + Name + "(" + - ID + " integer primary key autoincrement, " + + //ID + " integer primary key autoincrement, " + + ID + " text primary key, " + title + " text not null, " + description + " text, " + date + " integer, " + @@ -49,10 +47,10 @@ public class MySQLiteHelper extends SQLiteOpenHelper { public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // TODO Auto-generated method stub Log.w(MySQLiteHelper.class.getName(), - "Upgrading database from version " + oldVersion + " to " - + newVersion + ", which will destroy all old data"); - db.execSQL("DROP TABLE IF EXISTS " + Name); - onCreate(db); + "Upgrading database from version " + oldVersion + " to " + + newVersion + ", which will destroy all old data"); + db.execSQL("DROP TABLE IF EXISTS " + Name); + onCreate(db); } } \ No newline at end of file