Titanium Community Questions & Answer Archive

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

Crashing App from Database Open

Once I added database support to my application it consistently crashes after opening a second time.

So, I run the App, once I open the view that calls a database it works. Then I close the App and reopen and it crashes on launch. Any ideas?…

Just before posting this I figured out my issue. Make sure if you are opening a db.execute you are closing it after you use it.

— asked March 30th 2010 by John Welch
  • crash
  • database

1 Answer

  • Accepted Answer

    I have this problem if I do not close the database resource immediately after use.

    var TotalRows = db.execute('SELECT * FROM TABLE');
    var TotalCount = TotalRows.getRowCount();

    If I don't do TotalRows.close();

    My app crashes.

    — answered March 31st 2010 by Peter Lum
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.