开发者

Cannot find table on first run

I have an Android program I am writing that contains a database. On the first run it copies 开发者_如何转开发the database from the APK into the program's data directory. If I perform a query after that I get this error:

android.database.sqlite.SQLiteException: no such table: dictionary: , while compiling:

I don't get this error on subsequent queries.

Does anyone know how to fix this?


A database shouldn't be copied, you should create a SQLiteOpenHelper-class and use it to create/update your Database and insert some standard-values. Check out this older answer of mine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜