Manually Accessing SQL databases for debugging

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Manually Accessing SQL databases for debugging

Postby nbadal » Fri Jun 19, 2009 10:08 pm

Hi, I'm working on an app that uses a SQLite database, and I'm getting a table not found error when running it. Is there any way to manually browse the database to see what the problem is? (Something similar to phpMyAdmin maybe)
nbadal
Developer
Developer
 
Posts: 30
Joined: Tue May 26, 2009 3:55 pm

Top

Postby Mr_Tremor » Sat Jun 20, 2009 2:29 am

yup, use adb shell to drop to the shell, then locate the db in /data/data/package and run
Code: Select all
sqlite3 dbfile
this will bring you into the sqlite shell where .help will give you the information on commands.
Mr_Tremor
Developer
Developer
 
Posts: 26
Joined: Tue Jun 02, 2009 6:35 pm

Postby nbadal » Sat Jun 20, 2009 2:33 am

Thanks alot! Hopefully I can figure out my problem now
nbadal
Developer
Developer
 
Posts: 30
Joined: Tue May 26, 2009 3:55 pm

Postby nbadal » Sat Jun 20, 2009 3:01 am

Sorry to ask another question, but how and when do I export the database within the shell? Do i need to have a breakpoint after the data is entered and then start the shell?

I've tried using the '.dump' command, but it only shows:
Code: Select all
sqlite> .dump
BEGIN TRANSACTION;
COMMIT;
sqlite>


EDIT:
Actually I found out from here that you need to use /data/data/package/databases/data as the file, so nevermind
nbadal
Developer
Developer
 
Posts: 30
Joined: Tue May 26, 2009 3:55 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 3 guests