开发者

sqlite database version not getting set - android

I am trying to set the version number of my sqlite da开发者_运维技巧tabase, because I would like to upgrade it in the OnUpgrade method of my SQLiteHelper class. My helper class constructor is the following:

public DataBaseHelper(Context context){
super(context, DB_NAME, null, 1);
}

However, when I check the version of the database in the "openDataBase()" method, the version number is 0. What gives?


I found the problem: I needed to instantiate my database from the constructor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜