- Home /
System.Data.SQLite : Running on iOS, Windows not on Android
I am using the following dll's from System.Data.SQLite
SQLite.Interop.dll
System.Data.SQLite.dll
On iOS and Windows Unity Editor the following code creates the SQLite DB and is able to pull data back from it. When deploying to android it does not create the DB. I am perplexed and the data I've read via google is unclear on the next steps to remediate this.
Code Excerpt:
appDBPath = Application.persistentDataPath + "/datastore.s3db";
DataAccess oDao =
new DataAccess(@"Data Source=" + appDBPath + ";UseUTF8Encoding=True;Version=3;Password=SomePass;");
Excerpt from DataAccess.cs
public DataAccess(string ConnectionString){
SQLConn = new SQLiteConnection(ConnectionString);
SQLConn.Open();
Debug.Log("Connected to the SQLite DB");
}
I'm curious to know what you did to get System.Data.SQLite dlls to work inside Unity at all. I see all the packages say that .NET 3.5 or 4.0 are required, but Unity only uses 2.0 AFAI$$anonymous$$. I've tried to implement the 32-bit .NET 3.5 binaries, but Unity throws errors at runtime on the SQLite.Interop.dll not being found, even thought it's clearly in the Plugins folder...
Your answer
Follow this Question
Related Questions
Sqlite3.dll not found on specific Android devices 2 Answers
SQLite connection exception in android please help 0 Answers
problem retrieving data from SQLite to Android 2 Answers
how to access and modify my existing database made by DB browser for SQLite in unity after build 0 Answers
Sqlite4Unity3d difficulties 1 Answer