开发者

is there some way I can view a SQLite db?

I'm encountering a very odd behavior where a SQLite db entry is not throwing any exceptions, but when I later do a select where I search for the row I have 开发者_如何转开发inserted, it doesn't turn up.

I'm at a loss as to how to debug this, as I have no way to verify that the insert is actually working. I've examined all the SQL calls and they look right, so now I'm just stuck.

Is there a phone resident db tool of some sort that I can use to view the db? Or an ADB command line SQL thing of some sort?


Yes. ADB will let you examine databases from the shell.

See this page on the Android site: http://developer.android.com/guide/developing/tools/adb.html#sqlite


If you want this for development - you can use MOTODEV Studio from Motorola It has UI for SQlite. Its free!


Pull out the db file from the emulator. Open it with SQLite Browser.

And there are adb commands:

$ adb -s emulator-5554 shell
# sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.db
SQLite version 3.3.12
Enter ".help" for instructions
.... enter commands, then quit...
sqlite> .exit 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜