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;
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, " +
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