Results 1 to 9 of 9
  1.    #1  
    I noticed that my database gets dropped from time to time...either when I close the app and reopen it, update it via the SDK, or reboot. It doesn't happen every time, but it does happen.

    Are we suppose to close the database connecting in our cleanup method? If not, are we suppose to issue "commit" commands after queries???
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  2. #2  
    sqlite was designed to be a full ACID system with all changes/adds committed immediately upon completion but I don't know if there's something special about the Palm implementation.
  3. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #3  
    I was wondering this too.

    Had similar experience. Intermittenly my table got dropped. Didn't track it down to a particular event tho.
  4.    #4  
    Quote Originally Posted by DrewPre View Post
    I was wondering this too.

    Had similar experience. Intermittenly my table got dropped. Didn't track it down to a particular event tho.
    I've decided to spend some time pinpointing why exactly this happens. If you are researching as well let me know if you find anything...
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  5. #5  
    I haven't had an issue with the database closing down. What I do, is create global variable to store the SQL database handle and use it throughout my application. When I'm done, I issue a "VACUUM" SQL statement to clean up the database before I exit the app. I also explicitly close the database before exiting.
    cohoman

    Palm Apps:

    jVault and jChecklist
  6.    #6  
    Quote Originally Posted by cohoman View Post
    I haven't had an issue with the database closing down. What I do, is create global variable to store the SQL database handle and use it throughout my application. When I'm done, I issue a "VACUUM" SQL statement to clean up the database before I exit the app. I also explicitly close the database before exiting.
    I also have a global that stores the database id that I use throughout my app. My issue isn't that the database itself closes, it's that sometimes when my app is closed and reopened, the database has been truncated.

    I had been looking at the VACUUM statement on SQLite's site. My DB only has one table which has only one row (user data, and one preference), so I don't think that I have an issue there.

    However, how exactly are you explicitly closing the DB??? Is there a closeDatabase command in Mojo or are you doing it via a query???
    Last edited by Laxidasical; 11/25/2009 at 06:23 PM.
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  7. #7  
    Sorry, I actually don't close the SQL database when I exit the app. I was thinking of the Windows PC progamming version of SQLite. I don't think there is a close database command in HTML5.
    cohoman

    Palm Apps:

    jVault and jChecklist
  8. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #8  
    Tease!
  9.    #9  
    Quote Originally Posted by cohoman View Post
    Sorry, I actually don't close the SQL database when I exit the app. I was thinking of the Windows PC progamming version of SQLite. I don't think there is a close database command in HTML5.
    Quote Originally Posted by DrewPre View Post
    Tease!
    I know, right! LOL

    I finally said to hell with it and moved the data mentioned above to a cookie. I'll use SQLite as an offline/cache source for data grabbed from the web anyway and cookies for data that HAS to survive app restarts, app updates, and reboots.

    It only took me about 20 minutes to edit (about 7 scenes and 12 db calls), and it actually simplified my code a bit since I removed quite a few callbacks. Still, it would be nice to know that I could depend on SQLite data through thick and thin. :-|
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL

Posting Permissions