不能从第2版降级数据库1 [英] Can't downgrade database from version 2 to 1
本文介绍了不能从第2版降级数据库1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人可以帮助我解决这个例外,这是发生在我的code?
Can anybody help me to solve this exception which is occurring in my code?
02-10 17:16:32.406: E/AndroidRuntime(8619): android.database.sqlite.SQLiteException: Can't downgrade database from version 2 to 1
我stucked在此。并应我真的很在乎这个数据库版本的事?
I'm stucked in this. and should i really do care about this "Database Version" thing?
推荐答案
假设你正在使用安卓SQLiteOpenHelper
,你需要重写 onDowngrade
。
Assuming you are using Android SQLiteOpenHelper
, you need to override onDowngrade
if you want to be able to run your application with a database on the device with a higher version than your code can handle.
您应该关心这个数据库版本的事情如果有的话你的数据库结构是不断会改变(在一般情况下,有很好的机会,它会)。
You should care about this "Database Version thing" if ever your database schema is ever going to change (and in general, there is good chance it would).
这篇关于不能从第2版降级数据库1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文