1 Reply Latest reply on Aug 23, 2012 12:50 AM by verreydths

    Access database in project structure




      I'm working on an application that used LCDS, synchronization & offline storage.

      For demo purpose, we want to copy our database file to our project structure (com.demo.assets.demo.db).


      When we start our application, instead of logging in (when giving a demo, we're not connected to the company network), we want to read our data from the demo database.


      Is this possble?


      Normal, if we connect to our local storage database, we do it this way:

      var db:File = File.applicationStorageDirectory.resolvePath(AppConstants.DB_NAME_LOCAL)


      But now, we should read the database file, from our own project structure.



        • 1. Re: Access database in project structure
          verreydths Level 1

          To make the question simple:


          Can we add an demo.db file into an ipa / apk file for example so we could read demo data out of that database?

          And how can we access this database in our application?


          - Application Package

               - src

                    - (default package)

                         - Application.mxml

                         - demo.db


                    - Application-app.xml