Titanium Community Questions & Answer Archive

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

how to connect to a db


i made a db with the SQLite manager add-on from firefox. I named the file main.sqlite

How do i connect with the db and read the tables?

I am used to work with mysql. Is this the same?


— asked October 10th 2010 by Toby Justus
  • connect
  • db
  • sqlite

2 Answers

  • Hello. From a Titanium standpoint, I'm a total newb. But, I love SQLite. If you want to pull apart an SQLite database and interact with it getting to know the queries (which are much like mysql, but a bit more loose), check out this app:

    It requres Adobe AIR to run. Once you're more comfortable with SQLite databases in general, I then recommend getting it back into a mobile app like Titanium that takes a bit more time each build to see how things worked (or didn't). :)

    Hope that helps at least a small bit. Have an awesome day.


    — answered October 10th 2010 by Christopher Stevens
  • Sqlite databases are contained on files. In order to connect to them you will have to locate the file main.sqlite (no idea where firefox saves sqlite databases) and copy it to the Resources folder.

    From there you just need to follow the instructions from http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Database-module

    (first install the database and then open it)

    — answered October 10th 2010 by jordi martinez
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.