incendio Well-Known Member Licensed User Longtime User Apr 22, 2014 #1 Hi guys, I am trying to open Sqlite data as read only, the codes is like this Code: Copy If FirstTime Then SqlLt.Initialize(File.DirAssets, "data.db", True) End If I got error SQLiteCantOpenDatabaseException : unknown error (code 14): Could not open database But, if I change to this Code: Copy If FirstTime Then If File.Exists(File.DirRootExternal, "data.db") = False Then File.Copy(File.DirAssets, "data.db", File.DirRootExternal, "data.db") End If SqlLt.Initialize(File.DirRootExternal, "data.db", True) End If It is Ok. I don't need to do insert or update operation, just read data, why is that data need to copy from DirAssets to DirRootExternal? Thanks in advance.
Hi guys, I am trying to open Sqlite data as read only, the codes is like this Code: Copy If FirstTime Then SqlLt.Initialize(File.DirAssets, "data.db", True) End If I got error SQLiteCantOpenDatabaseException : unknown error (code 14): Could not open database But, if I change to this Code: Copy If FirstTime Then If File.Exists(File.DirRootExternal, "data.db") = False Then File.Copy(File.DirAssets, "data.db", File.DirRootExternal, "data.db") End If SqlLt.Initialize(File.DirRootExternal, "data.db", True) End If It is Ok. I don't need to do insert or update operation, just read data, why is that data need to copy from DirAssets to DirRootExternal? Thanks in advance.
Erel B4X founder Staff member Licensed User Longtime User Apr 22, 2014 #2 File.DirAssets is a virtual folder. It only allows sequential reading of files. It will not work with SQL databases. Upvote 0
File.DirAssets is a virtual folder. It only allows sequential reading of files. It will not work with SQL databases.
incendio Well-Known Member Licensed User Longtime User Apr 22, 2014 #3 I see, thanks for explanation. Upvote 0