How to view the SQLite database and tables

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to view the SQLite database and tables

Postby nithin.warier » Fri Feb 29, 2008 6:43 am

If i created a datase using these statements,

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  this.createDatabase("Testing", 1, MODE_PRIVATE, null);
  2.  
  3.              myDatabase = this.openDatabase("Testing", null);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


How can i see the Testing database and the tables in it..

Thanks
Nithin
nithin.warier
Experienced Developer
Experienced Developer
 
Posts: 87
Joined: Thu Feb 28, 2008 12:05 pm
Location: Malappuram Kerala India

Top

Postby living_sword » Fri Feb 29, 2008 7:06 am

try this
Image
living_sword
Junior Developer
Junior Developer
 
Posts: 23
Joined: Fri Nov 23, 2007 4:44 am

Postby plusminus » Fri Feb 29, 2008 4:49 pm

Hello nithin,

you should have a look at this sqlite tutorial :arrow: http://www.anddev.org/viewtopic.php?t=319

It won't show you the tables, but you can simply query for all datasets in a table:
Syntax: [ Download ] [ Hide ]
Using sql Syntax Highlighting
  1. SELECT * FROM TABLE;
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby nithin.warier » Sat Mar 01, 2008 5:15 am

hi plusminus,

thanks for your reply. But my question is can we see the tables from terminal mode..

Thanks
Nithin
nithin.warier
Experienced Developer
Experienced Developer
 
Posts: 87
Joined: Thu Feb 28, 2008 12:05 pm
Location: Malappuram Kerala India

Postby nithin.warier » Sat Mar 01, 2008 8:19 am

Hi plusminus,

Now got it.. Thanks
nithin.warier
Experienced Developer
Experienced Developer
 
Posts: 87
Joined: Thu Feb 28, 2008 12:05 pm
Location: Malappuram Kerala India

Postby erbedo » Tue Mar 18, 2008 11:28 am

nithin.warier wrote:Hi plusminus,

Now got it.. Thanks


So why don't you share it with us :) ?
Proudly supporting Android :)
erbedo
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu Mar 13, 2008 9:39 pm

Top

Postby nithin.warier » Tue Mar 18, 2008 1:21 pm

Hi erbedo,

What i did is just gone throught the tutorial what plusminus posted...

Actually, the problem in my case is, i created a table in one structure, later i modified the structure, so its showing, the table "Test" already there. What i did is delete the table from terminal mode using the tutorial.... (Through adb shell, cd data, cd data, cd packagename,
sqlite3 Databasename) then using the statement

drop table tablename;

i did it...

i dont feel its necessary to write what my problem is... now, you specifcally asked, i wrote..

Thanks
Nithin
nithin.warier
Experienced Developer
Experienced Developer
 
Posts: 87
Joined: Thu Feb 28, 2008 12:05 pm
Location: Malappuram Kerala India

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests