Problemas con SQLite + SpatiaLite
Estoy intentando acceder a un SpatiaLite desde C # usando el proveedor System.Data.SQLite. Cuando intento cargar la extensión SpatiaLite, siempre obtengo la
System.Data.SQLite.SQLiteException: SQLite error
The specified module could not be found.
error, aunque la dll de spatialite se ha copiado en el directorio bin. Incluso traté de especificar la ruta absoluta a la dll, pero fue en vano.
Aquí está el código:
string connectionString = @"Data Source=D:\MyStuff\projects\OsmUtils\trunk\Data\Samples\DB\osm.sqlite";
using (SQLiteConnection connection = new SQLiteConnection (connectionString))
{
connection.Open();
using (SQLiteCommand command = connection.CreateCommand())
{
command.CommandText = @"SELECT load_extension('libspatialite-1.dll');";
command.ExecuteScalar();
}
...
Desdeeste enlace Tengo la impresión de que esto debería funcionar.
Gracias por adelantado