SQLite & Android: unable to open database file - error 14

I saw that a similar problem has been reported many times. In my case, I directly use the "C" API, which is called using my own JNI library (and not the Java Java level), with the latest merge of 3.8.3. Therefore, I control what I'm dealing with. Then, on certain operations (UPDATE), I get an error that it cannot open the database file. I do not get this with INSERT statements, only UPDATE. When I activate the SQLite error callback, I see the following:

cannot open the file on line 29299 from [6c643e45c2] os_unix.c: 29299: (13) open (./etilqs_1zMsiYdpXhd3JqY) - instructions are interrupted by 36: [UPDATE .....]

Digging this a little further, it seems to be related to the log file. When I set journal_mode to MEMORY using pragma, the problem disappears. But all other modes, such as WAL or TRUNCATED, lead to the same error.

When debugging code from eclipse, I see the -journal file that is generated when INSERT is run. And then deleted when the transaction is completed. Therefore, he informs me that he has enough rights in the directory (/ data / data //)

Note that the same code works fine (C and Java) on Windows, where I am not getting an error. There is something specific going on with Android and file access.

I have a way to get a systematic error. If someone has an idea of ​​what I should check, then I will be happy to conduct some kind of experiment and report the result.

+3
1

..

​​ .

.

PRAGMA temp_store_directory = ' '

SQLITE3 "", .. ..

..

. sqlite3 - [sqlite-amalgamation-3100200]

+2

All Articles