Use arguments for TrivialFragment
[unical.git] / src / ro / ieval / unical / MySQLiteHelper.java
index dc3595157db2a37f9040b810d286a2f90b290b54..dbadca58e89af64f5497ccff38c71824c9c9de64 100644 (file)
@@ -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
This page took 0.010786 seconds and 4 git commands to generate.