开发者

How to access android /data/data database using SQLite? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I have written a code using DataBaseHelper class, i make a database using SQLite and place it in assets, then this helper class copies it into /data/data/mynamespace/databases, but if i insert values using SQLBrowser in SQLite db which is in assets folder, then i read it using code, but i dont find those inserted 开发者_如何转开发values, but if i insert it using code, i can see my values inserted, i understood it in such a way that assets and /data/data are two separate copies, but question is, how can i browse data using SQLite Database Browser from /data/data/mynamespace/databases/mydb file. Because that is the actual db, in assets there is just a copy, please let me know its solution.


In this article he reads a SQLite file from the assets folder and copies it to ../../data/databases folder.

I am using this code and its' working fine for me.


It sounds like your copy operation is either failing or going to the wrong place.

So when you try to access the database it is just being created instead of opened.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜