0 Replies Latest reply on Aug 4, 2010 11:42 AM by hdyar

    False File.exists; flex cannot open SQLite.db file

    hdyar Level 1

      I have a program that uses an SQLite database. Instead of creating and importing the database, the sqlite databse already exists, with the data.


      I am trying to open it and read the information (select* from table - for example); But nothing i do seems to work.

      The error I am getting is: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'. I have checked the path repeatedly, The file exists. I run flash builder as administrator (win7).


      I have moved the database file all around. In the final version of the program, the database will be stored in a seperate drive on a network (Z:/database.db, for example) So i need to use the absolute path; although i have tried others (application storage directory, etc)


      var dbFile:File = new File("C:\Users\Public\Documents\graduates.db");

      trace('exists:' + dbFile.exists);

      //above being the important bit.

      dbStatement = new SQLStatement();

      dbStatement.itemClass = Grad;

      aluDB = new SQLConnection();

      dbStatement.sqlConnection = aluDB;

      aluDB.addEventListener(SQLEvent.OPEN, onDatabaseOpen);

      aluDB.addEventListener(SQLErrorEvent.ERROR, errorHandler);

      aluDB.open(dbFile);//error occurs here, of course.


      can anybody help me figure out why this error is occuring? Or even just a different method of opening the file?