Getting an error when trying to store database in cache directory

Hello,
"SQLError: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'"
this is my code :
sqlConn = new SQLConnection();
var str:String=File.applicationDirectory.nativePath;
var cacheDir= new File(str +"/\.\./Library/Caches");
var dbFile:File=cacheDir.resolvePath("DB.db");
sqlConn.open(dbFile);
sqlStat = new SQLStatement();
sqlStat.sqlConnection=sqlConn;
It works if I use var dbFile:File=File.applicationStorageDirectory.resolvePath("DB.db");

With AIR 3.6 latest prerelease, A new static property, File.cacheDirectory has been added, which points to the <APPLICATION_HOME>/Library/Caches directory on iOS devices, and files in this directory are not backed up. So, the above workaround is not required.
Another property, preventBackup is introduced in the File API, which when set prevents a file or a folder from getting backed up on the iCloud. This property works on iOS 5.1 devices and later.
You can find additional details on this feature here<http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air3-6_flashplayer11-6_release notes.pdf>

Similar Messages

Maybe you are looking for

  • Cannot send email from yahoo account on iPhone 5

    I just got an iPhone5 and I couldn't set up my Yahoo email as "yahoo"--it would not allow me to complete the process despot multiple attempts. I had to set it up as an "other" account. I can receive and read emails on my phone, but when I reply those

  • How to create a slideshow at homepage

    how to create a slideshow at homepage like this http://www.thinkfa.com/ if I have to using java script, how do I can get started to use javascript for iweb? Thanks before R.E

  • HT1657 Why won't my rented movie play?

    I tried renting a movie from iTunes but i just get a black screen with no sound. Help?

  • Upgrade path question...

    I've been using golive 6 and in about a month I'm planning to upgrade...I'm seeing upgrades to golive 9 (which i read here has its problems), CS2 which I'm assuming I can update golive 6 to, and then the alternative that the Adobe site offers/suggest

  • I cant find word document that i saved on my desktop

    i cant find word document that i saved on my desktop