- Home /
Question by
deepak_unity674 · Nov 03, 2018 at 04:27 AM ·
sqlite
How to read db file in unity
I have tried to read SQLite DB file in unity project. When I run the application in mac, DB files read successfully but when running the application in windows I am getting shared violation exception. Please suggest any idea to read SQLite DB file in windows. Here is the code I am using for reading SQLite DB file.
Sample code :
string dbPath = "C:/Users/test12/AppData/LocalLow/test Solutions Ltd/testapp/testdb.db";
dbPath = Path.GetFullPath(dbPath);
var dbData = File.ReadAllBytes(dbPath);
In above code getting the exception in file.readallbytes()line.
Comment
Answer by DerRichtige · Mar 27, 2020 at 09:08 AM
@deepak_unity674 Have you tryed run Unity/your App as an administrator?
Your answer
Follow this Question
Related Questions
sqlite in unity indie version C# 5 Answers
Can't hold number types in sqlite table 0 Answers
Unity SQLite export 0 Answers
Are my SQLite .dll locations causing a Unity 5 build compile error? 0 Answers