0

I have a problem with the SQLiteHelper in android. I'm using a singleton class to control all the data base interactions, so it has a SQLite object. The problem is that when I create a new object of the SQLite, the method onCreate is not called and then, the data base is not initialized... I read that you have to instance a writter or reader to call that method, but I have already done it and it is not called...

What can it be?

Thanks...

Frion3L
  • 1,502
  • 4
  • 24
  • 34

1 Answers1

1

If the db already exists from an earlier version, it won't call onCreate. Try uninstalling the app, which will delete the old db.

Sofi Software LLC
  • 3,879
  • 1
  • 36
  • 34
  • Or only delete the database file http://stackoverflow.com/questions/2161243/android-delete-entire-database/2161447#2161447 – ccheneson Nov 19 '11 at 21:01