I'm working on a project that's making use of sqlite using the Mono.Data.Sqlite dll so that my program is cross platform on Windows and mono. The program successfully builds without any issues but then when I run the program, and it tries to make a connection to the database.
However, I am getting an error
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Below is the code for how I am connecting to the SQLite database
public SqliteConnection conn = null;
private static string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
private static string exeName = System.Reflection.Assembly.GetEntryAssembly().GetName().Name;
public static string DATABASE_PATH = path + string.Format("\\BoardiesITSolutions\\{0}\\{0}.db", exeName);
public ConnectSQLiteDatabase(string dbPassword)
{
try
{
Console.WriteLine("DB Password: {0}", Encryption.decrypt(dbPassword));
conn = new SqliteConnection("Data Source="+DATABASE_PATH+";Password="+Encryption.decrypt(dbPassword));
conn.Open();
}
catch (SqliteException ex)
{
Console.WriteLine("Open Error: " + ex.Message);
}
}
Thanks for any help you can provide.