I try to download the new json1 extension when establishing a connection, but I keep getting this error:
SQL logic error or missing database
The specified procedure was not found.
Here is my code:
SQLiteConnection connection = (SQLiteConnection)session.Connection; connection.EnableExtensions(true); Assembly assembly = Assembly.Load("System.Data.SQLite"); connection.LoadExtension(assembly.Location, "sqlite3_json_init");
I use NHibernate, so I just grab the connection from the session before executing any logic.
Is there something I'm doing wrong? I also tried loading SQLite.Interop.dll, and then called the sqlite3_json_init method and still does not work.
I did this and it still does not work:
SQLiteConnection connection = (SQLiteConnection)session.Connection; connection.EnableExtensions(true); string path = "F:\\GitHub\\ExampleProj\\lib\\sqlite\\SQLite.Interop.dll"; if (File.Exists(path)) { connection.LoadExtension(path, "sqlite3_json_init"); }
source share