SQLite Browser

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

SQLite Browser

Postby AsTeR » Tue Jun 17, 2008 9:39 am

Hello all,

I'm currently trying to learn Androïd and i feel a bit disapointed with SQLite. I've experienced fiew problems with it and i would enjoy if someone can explain me how to browse SQLite ? To see if my data has been insert or not.

I use Android m5 and I develop on Ubuntu 8.04.

Nice day.
AsTeR
Junior Developer
Junior Developer
 
Posts: 19
Joined: Tue Jun 17, 2008 8:36 am

Top

Postby andy_n » Thu Aug 07, 2008 9:20 am

Hi,
I don't know if there're any graphical browsers available. But what definitely works is watching the entries by using the console. So just connect to your emulator by running "adb shell" in your console (that's the command for Windows, but Linux shouldn't vary that much). After being automatically logged on run the command "sqlite3 /data/data/com.google.android.providers.contacts/databases/contacts.db" for getting the contact entries for example.

You can find out the names of the available databases by browsing through the directories. So under "/data/data/" the databases are stored. To find out the tables names open the ".db" files with "cat [filename]" to get the content in a more or less readable format.

It's not a comfortalbe method, but it works. If anybody knows another way, just say it! :-)
andy_n
Freshman
Freshman
 
Posts: 7
Joined: Tue Jul 08, 2008 3:08 pm

Postby cgreen » Fri Aug 08, 2008 2:30 pm

i can add, that there are some usefull build-in function in the "sqlite3" commandline

if you have connected sqlite3 to a database-file, you could enter

.help - for some help information
.tables - to list available table names in the database
.headers on - turns on table headers to be shown, when executing select statements


mind the leading dot !
User avatar
cgreen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Wed Jul 16, 2008 10:16 am

Postby bavarol » Sat Sep 06, 2008 9:11 am

A very good graphical browser for sqlite is "sqlite expert", I recommend you
bavarol
Experienced Developer
Experienced Developer
 
Posts: 52
Joined: Mon Dec 10, 2007 9:19 pm

Postby rmanromga » Tue Oct 14, 2008 1:44 am

You could also use 'sqlitebrowser' which is free... if you use Ubuntu like I do, you could just type:

sudo apt-get install sqlitebrowser

This will install your sqlitebrowser into your machine..

Then when developing in Android, using Eclipse for example you could go to the DDMS perspective and use the file browser in the DDMS perspective to browse to your databasee location which is probably
/data/data/your_project_file structure/databases/your_database.db then you can pull that file from the device. (Its cool that the DDMS has a button to do this). Once the database is in your file system you can then open and browse it using the sqlitebrowser... This still kind of indirect and a round about way to do it but it works for me for now... I guess the next step is for someone to build a slite3 browser that can be packaged with the phone....

--D
rmanromga
Developer
Developer
 
Posts: 43
Joined: Thu Dec 20, 2007 6:21 am
Location: Baltimore, MD USA

Postby Marchu » Thu Oct 23, 2008 12:12 am

I think you mean the sqlbrowser at Sourceforge.

http://sourceforge.net/project/showfiles.php?group_id=87946

Great graphical browser and very simple to use.
Beside for Unix, also for Windows and Mac.

But like you mentioned, you must first pull the database from the device, to open him.

Cheers
Marchu
Junior Developer
Junior Developer
 
Posts: 22
Joined: Sat Sep 27, 2008 4:11 pm
Location: Netherlands

Top

Postby rmanromga » Thu Oct 23, 2008 6:02 pm

Yes I meant that sqlite browser in source forge.... but of course the luxury of using UBUNTU (luvs it) is that it is in the repositories so an apt-get install does the installation in a snap !!

Thanks,
--D
rmanromga
Developer
Developer
 
Posts: 43
Joined: Thu Dec 20, 2007 6:21 am
Location: Baltimore, MD USA

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Google Feedfetcher and 8 guests