vendredi 25 décembre 2015

How to update db's column name wihout creating a new db? (Android Studio ,SQLite)

I changed one of the column's name in my db and when I run my app I get this error :

5 10449-10449/? E/AndroidRuntime: FATAL EXCEPTION: main
                                               Process: com.liavbapps.mascoret, PID: 10449
                                               android.database.sqlite.SQLiteException: no such column: TarrifHolyDay (code 1): , while compiling: UPDATE MySettings SET TarrifHolyDay=?

I know that happens beacuse it try to update a column that doesnt exist in my current db. If I will open a new db it will contain the new column name , but I lose my data. My question is how can I update my current db's column name, in oreder to keep my data ? Thanks!

Aucun commentaire:

Enregistrer un commentaire