J junaidahmed Well-Known Member Licensed User Longtime User Dec 27, 2010 #1 I am facing problem when opening sqlite database. "Attempt to write Readonly Databse",my sqlite database path is "/mnt/sdcard/external_sd/data/Mis.S3db".Pls advise where it is problem.
I am facing problem when opening sqlite database. "Attempt to write Readonly Databse",my sqlite database path is "/mnt/sdcard/external_sd/data/Mis.S3db".Pls advise where it is problem.
Erel B4X founder Staff member Licensed User Longtime User Dec 27, 2010 #2 See this: http://www.b4x.com/forum/basic4andr...als/6808-error-writing-sd-card-how-solve.html Upvote 0
tremara1 Active Member Licensed User Longtime User Dec 27, 2010 #3 sqlLite db This is the code I used in an app I just finished...it checks if the db is in the default external (sd card) if not it copies it from a copy in dir assets folder. Code: Copy If File.Exists(File.DirDefaultExternal,"meds.db") = False Then File.Copy(File.DirAssets,"meds.db",File.DirDefaultExternal,"meds.db") End If If SQL1.IsInitialized = False Then SQL1.Initialize(File.DirDefaultExternal, "meds.db", False) End If It worked in the emulator and on my 2 devices. I think it might be to do where your db is located....hope this helps Upvote 0
sqlLite db This is the code I used in an app I just finished...it checks if the db is in the default external (sd card) if not it copies it from a copy in dir assets folder. Code: Copy If File.Exists(File.DirDefaultExternal,"meds.db") = False Then File.Copy(File.DirAssets,"meds.db",File.DirDefaultExternal,"meds.db") End If If SQL1.IsInitialized = False Then SQL1.Initialize(File.DirDefaultExternal, "meds.db", False) End If It worked in the emulator and on my 2 devices. I think it might be to do where your db is located....hope this helps
D Deleted member 103 Guest Dec 27, 2010 #4 Hi junaidahmed, I also had the same problem, I've renamed the file with small letters eg "Mis.S3db" in "mis.s3db"and already it has worked. I also used the example of tremara1. Ciao, Filippo Upvote 0
Hi junaidahmed, I also had the same problem, I've renamed the file with small letters eg "Mis.S3db" in "mis.s3db"and already it has worked. I also used the example of tremara1. Ciao, Filippo