samedi 16 avril 2016

System.Data.SQLite Can't Load Extension

I'm trying to load the new json1 extension when the connection in set up, but I keep receiving this error:

SQL logic error or missing database The specified procedure could not be 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'm using NHibernate, so I just grab the connection from the session before any logic is executed.

Is there something I'm doing wrong? I've also tried loading SQLite.Interop.dll and then calling the sqlite3_json_init method and that still does not work.

Aucun commentaire:

Enregistrer un commentaire