1 Reply Latest reply on Jan 2, 2010 1:39 AM by GapingWound

    Javascript/CSS/HTML built app - fine in Aptana, not when installed

    kevinleitch

      Hi,

       

      I have a fairly simple (or so I thought) app that takes values, inserts them into SQLite when told to so so by the user. This app also displays the values when the app is loaded.

       

      I have developed this in Aptana and everything works perfectly in the Aptana environment. However, when I make the whole thing into an .air file and install it, it doesn;t seem to be able to use the database. Here is my load function:

       

      function doLoad(){
                      var file = air.File.applicationDirectory.resolvePath('pastOrders.db' );
                      db.addEventListener( air.SQLEvent.OPEN, doDbOpen );
                      db.open( file, air.SQLMode.UPDATE );
                      stmt.text = 'SELECT * FROM order_tbl ORDER BY order_id DESC LIMIT 3';
                      stmt.execute();
                  }

       

      The file pastOrders.db is in the application root. I can also see it exists when the app is installed locally. My app doesn;t seem able to use the database however. I have no idea why. Any suggestions would be greatly appreciated