views:

24

answers:

1

Help! I updated my android application on the market. This update included a change in the databaseHelper file where I put in more data and tables. Normally, when debugging, I would have to uninstall and reinstall the app because it doesn't see the new values in the database. Now, it's doing the same thing on the market.

Why is this happening? How can I fix this? Is it possible to 'rollback' the changes to the app?

A: 

You can't roll it back - there is no history in the market. You can publish your previous version again (which, of course, will cause database mayhem again).

As for upgrading databases - You should be using SQLiteOpenHelper to manage your database. That way, you can have a version number, which will be used to call onUpgrade() when necessary at which point you can use ALTER TABLE to add new columns (or create new tables altogether). The notepad example demonstrates all this.

EboMike