Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Database browser?

It would really help if I could peer into my app's database to check if the right data is being stored in the correct spots, etc. Is there a way to browse the table data or a way to issue SQL commands? Maybe there's something provided with the emulator's tools or an app I can install within the emulator?

Android, Titanium 1.4, Windows

Thanks,
Tim

— asked August 25th 2010 by Tim Poulsen
  • android
  • mobile
0 Comments

2 Answers

  • firefox has a plugin, SQLite manager. I use that one.

    — answered August 25th 2010 by Daniel Lim
    permalink
    3 Comments
    • Ooh, that sounds better than the adb tool. Can I use it to open a database within the emulator? I can't find my app's databases anywhere on my hard drive. Perhaps I need to copy them out of the emulator somehow.

      — commented August 25th 2010 by Tim Poulsen
    • oh, didn't see you are using for android. I never tried to pull db file from android emulator but an xml file, the step should be similar however. see this

      http://developer.appcelerator.com/question/50351/android–wheres-the-physical-file-location-write-to-application

      — commented August 25th 2010 by Daniel Lim
    • Thanks Daniel. I've figured out the adb tool and am using it. It's not as nice as the browser plugin. But, I can issue sql commands against my database.

      on the emulator, your database is
      /data/data/com.yourcompany.yourapp/databases/dbname

      Then you just enter sql commands (select * from tbl;) making sure to end them with a semicolon.

      Tim

      — commented August 25th 2010 by Tim Poulsen
  • I found the answer. See http://developer.android.com/guide/developing/tools/adb.html#sqlite

    And see http://www.sqlite.org/sqlite.html for the SQLite commands you can enter.

    Tim

    — answered August 25th 2010 by Tim Poulsen
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.