0

I have a SQLite db I include in the assets folder. I installed the app on a device. I understand it gets copied into memory and everything works OK.

Now I changed the structure of a table in the SQLite db using the SQL Browser. So I replaced the one in the assets folder with the new one and incremented my app version number.

From reading questions I understand that when I upgrade the app on a device the "onUpgrade" will be called and it seems I must first delete the previous SQL db, since it's not the correct structure.

Do I just delete the older version when "onUpgrage" is called and then do what?

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Keith
  • 261
  • 1
  • 3
  • 8
  • Please see http://stackoverflow.com/questions/3505900/sqliteopenhelper-onupgrade-confusion-android – olooney Jul 15 '11 at 13:31

1 Answers1

0

Its better to uninstall your previous application and install the new one with changed database structrue.

Rasel
  • 15,499
  • 6
  • 40
  • 50
  • Sorry i forgot to mention, its for android.Tag says its android.So i think will work just fine – Rasel Jul 15 '11 at 13:29