0

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?

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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

1 Comment

thanks for the mention. Yes, you can use MOTODEV Studio to view a database on the emulator or a developer/rooted phone. If the database is on a commercial phone, you will need to store it to the SD card on the phone explicitly with the CreateDatabase() API using '/sdcard/myfolder/mydb.db'.
1

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 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.