I posted the question on StackOverflow:
http://stackoverflow.com/questions/21661814/sqlite-android-unable-to-open-database-file-error-14
Any help would be greatly appreciated!

I saw that a similar issue has been reported many times. In my case, I'm
directly using the "C" API invoked using my own JNI library (not the
Android Java layer), with the latest amalgamation 3.8.3. So I control what
I'm dealing with. Then, on certain operations (UPDATE) I'm getting an error
stating that it cannot open a database file. I don't get that with INSERT
statements, only UPDATE. When I activate the SQLite error callback, I'm
seeing the following:

cannot open file at line 29299 of [6c643e45c2] os_unix.c: 29299: (13)
open(./etilqs_1zMsiYdpXhd3JqY) - statements aborts at 36: [UPDATE .....]

Digging this a little bit further, it appears to be related to the journal
file. When I set the journal_mode to MEMORY using a pragma, then the issue
disappears. But all the other modes, like WAL or TRUNCATED lead to the same
error.

When debugging the code from eclipse, I can see the -journal file being
created when performing the INSERT. And then being removed when the
transaction is complete. So it tells me that it has enough rights on the
directory (/data/data//)

Note that the exact same code works perfectly (C & Java) on Windows, where
I'm not getting the error. There is definitively something going on with
Android and file access.

I have a way to get the error reproduced systematically. If someone has
some idea on what I should check, then I'll be happy to run some experiment
and report the result.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to