in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Error using SpatiaLite

Last post 03-22-2009 12:37 PM by martinr. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-22-2009 12:37 PM

    Error using SpatiaLite

     Hi,

    I have the following problem:

    In my web application (C#, .net 2.0) I want to use the spatial functions of SpatiaLite.

    I referenced these dlls:

     Image: dlls

     

    This is my sourcecode:

    using System.Data.SQLite;
    .....

    string connstring = @"Data Source=C:\spatialite\website\app_data\db.sqlite;Version=3;";
    SQLiteConnection cn = new SQLiteConnection(connstring);

    cn.Open();
    object ret = new SQLiteCommand("SELECT load_extension('libspatialite-2.dll');", cn).ExecuteScalar();


    When executing, this error appears:

    Ausnahmedetails: System.Data.SQLite.SQLiteException: SQLite error
    Das angegebene Modul wurde nicht gefunden.

    [SQLiteException (0x80004005): SQLite error
    Das angegebene Modul wurde nicht gefunden.
    ]
       System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt) +375
       System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt) +202
       System.Data.SQLite.SQLiteDataReader.NextResult() +236
       System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) +95
       System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) +38
       System.Data.SQLite.SQLiteCommand.ExecuteScalar() +39
       default.Page_Load(Object sender, EventArgs e) in c:\spatialite\WebSite\default.aspx.cs:39
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

     

     

    Do you know a solution?

    THanks!

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems