I can't get the LoadExtension() function to work under Visual Studio 2015
Express C#. I have tried to load several extensions that do work under the
SQLite console but they will not load under C#. So I created the minimal
example of an example extension given on sqlite.org using the half.c source. It
loaded and worked under the SQLite console but failed to load it in a simple C#
program with the code snippets shown here:
...
using System.Data.SQLite;
...
SQLiteConnection m_dbConnection;
...
string str_extension_path = @"C:\Users\Admin\Documents\Visual Studio
2015\Projects\half_ext\half.sqlext";
...
string str_DB_Connect = "Data Source=" + textBox_DBPath.Text.ToString()
+ "; Version=3;";
m_dbConnection = new SQLiteConnection(str_DB_Connect);
m_dbConnection.Open();
m_dbConnection.EnableExtensions(true);
m_dbConnection.LoadExtension(str_extension_path);
...
The program had this exception when the .LoadExtension() executed:
"An unhandled exception of type 'System.Data.SQLite.SQLiteException' occurred
in System.Data.SQLite.dllexception
Additional information: SQL logic error or missing database
The specified module could not be found."
I've tried many other approaches, for example, using SELECT
load_extension('half.sqlext'), and rebuilt everything in x86 and x64 but to no
avail.
Does anyone have a working example with source of an extension and a working VS
2015 C# program that loads it? Or doesn't this feature work.
TNX
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users