- Home /
Update to Unity 5, then DllNotFoundException: sqlite3
Hi, I am working with SQLite for some weeks. Everything goes well untill I updated my Unity version to 5.
My 'Mono.Data.Sqlite.dll' and 'System.Data.dll' are copies form 'Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0'. And put them at 'Plugins' folder.
Unity version: 5.0.0f4 Personal
Error Log: Data Source=D:/eProjects/Unity/老婆的记账本/Assets/xyc.db, System.DllNotFoundException: sqlite3 at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_open_v2 (byte[],intptr&,int,intptr) at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00000] in :0 at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in :0 at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteConnection:Open () at DbAccess.OpenDB (System.String connectionString) [0x0000c]
Answer by submiting · Apr 15, 2015 at 05:32 AM
You need to use sqlite3 x64 due to unity5 editor is x64. I had the same issue. Downloading the following sqlite3-64.dll assembly and renaming to sqlite3.dll helped me: http://blog.synopse.info/post/2013/03/23/Latest-version-of-sqlite3.dll-for-Windows-64-bit
@wulveagfin: Why do you want a mirror? The links look like they still work. It's a 7-zip archive so make sure you have 7zip or an archive program that supports 7z files.
@Bunny83 the link was broken but finally worked for me.
And this is the correct answer for anyone else who happens upon this. Fixed me right up.
Thanks for your replies~ Finally, I solved this by ????. Use ".so" file, and c/c++ extern functions.
Answer by azolson1 · Dec 28, 2016 at 05:13 PM
rather than downloading from a random blog, you can download the correct SQLite library from the official site here
The download that worked for me on that page was 64-bit DLL (x64) for SQLite version 3.15.2.. The zip file contains sqlite3.dll.
hope that helps