EntryPointNotFoundException in SQLite after displaying FolderBrowserDialog

前端 未结 2 1458
梦谈多话
梦谈多话 2020-12-19 17:09

When using a 64-bit program System.Data.SQLite is throwing the following EntryPointNotFoundException:

Unable to find an entry point named \'sqlite3_ch

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 17:11

    I had the same issue when I used GMAP.NET, which appeared to be opening an SQLite connection using an older version. Then, when I attempted to open a connection with the newer version, the error with SQLite.Interop.dll occurred.

    By opening a dummy connection with the newer version before instantiating the GMAP.NET object using the older connection, the error went away. The connection doesn't have to do anything, it just has to be opened first.

    using (SQLiteConnection con = new SQLiteConnection("Data Source=" + dat + ";Version=3;"))
    {
        con.Open();
    }
    

提交回复
热议问题