Android - Attempt to write in a readonly database when I open it readonly

Posted by DLock on Stack Overflow See other posts from Stack Overflow or by DLock
Published on 2012-09-27T09:24:50Z Indexed on 2012/09/27 9:37 UTC
Read the original article Hit count: 456

Filed under:
|

i don't understand this at all. I try to open a db located in my SD card this way:

db = SQLiteDatabase.openDatabase(myPath, null, 
           SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.OPEN_READONLY);

But in that very line it throws this exception:

android.database.sqlite.SQLiteException: attempt to write a readonly database

It doesen't happen in my other devices, just this one that has android 2.3.3

© Stack Overflow or respective owner

Related posts about android

Related posts about sqlite