Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

SQLError #3125

$
0
0

Is this a bug or a feature? I can create a db directly inside ApplicationStorage, but not inside a (non-existent) folder in Application Storage. I get the error: SQLError: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'

 

As an example, open an AIR FLA and simply test these paths to the db file:

 

var dbpath:String = File.applicationStorageDirectory.url + "db/mydb"; // fails unless db is there already

var dbpath:String = File.applicationStorageDirectory.url + "mydb"; // works regardless, even if the local storage folder does not exist yet

 

var f:File = new File(dbpath);

var sql:SQLConnection = new SQLConnection();

sql.open(f, SQLMode.CREATE, false, 1024, null); // runtime error if path 1 is used.

 

(in flash CS4)

 

As a workaround I suppose I could, before creating the db, write a temp file to the path where the db should reside. That way, the path would exist. Is that the only way or am I missing something?

 

Thanks


Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>