2 Replies Latest reply on Mar 8, 2011 8:40 AM by Stefan Horochovec

    Sqlite Database

    bspShankar

      Hi,

       

      I am using the below  code in two different Action script

       

      var dbFile1:File = File.applicationStorageDirectory.resolvePath("sheduler.db"); //Creating the  database sheduler.db
                  sqlc.openAsync(dbFile1);
                  sqlc.addEventListener(SQLEvent.OPEN, dbFile_opened );
                  sqlc.addEventListener(SQLErrorEvent.ERROR, errorAlert);
                  sqls.addEventListener(SQLErrorEvent.ERROR, errorAlert);

       

       

      i am pointing to the same database from other action script......

       

      var dbFile2:File = File.applicationStorageDirectory.resolvePath("sheduler.db");

       

      The Problem is database is getting created twice.... i.e each time when i use resolvepath.....

       

      where i am going wrong can u pls let me know....

       

      Pls make me clear in what situations to use open and openAsync for database in sqlite

       

       

      Thanks & Regards