Problemas SQLite + SpatiaLite
Estou tentando acessar um SpatiaLite de C # usando o provedor System.Data.SQLite. Quando tento carregar a extensão SpatiaLite, sempre obtenho o
System.Data.SQLite.SQLiteException: SQLite error
The specified module could not be found.
erro, mesmo que a dll da spatialite tenha sido copiada para o diretório bin. Eu até tentei especificar o caminho absoluto para a dll, mas sem sucesso.
Aqui está o 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();
}
...
Deesse link Eu tenho a impressão que isso deve funcionar.
desde já, obrigado