在SQLite官方下载了System.Data.SQLite,编写如下测试代码:

using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=F:\my.db;Pooling=true;FailIfMissing=false"))
{
    using (SQLiteDataAdapter adapter = new SQLiteDataAdapter("select id,total from table1", conn))
    {
        DataTable table1 = new DataTable();
        adapter.Fill(table1);

MessageBox.Show(table1.Rows[0]["total"].ToString());
    }
}

运行出错,在new SQLiteConnection处提示:

引用内容
无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。

解决方法

我下载的System.Data.SQLite版本是Precompiled Binaries for 32-bit Windows (.NET Framework 3.5 SP1),这个版本提供了两个zip包:

①.sqlite-netFx35-binary-bundle-Win32-2008-1.0.79.0.zip

引用内容
This
binary package features the mixed-mode assembly and contains all the
binaries for the x86 version of the System.Data.SQLite 1.0.79.0 (3.7.10)
package. The Visual C++ 2008 SP1 runtime for x86 and the .NET Framework
3.5 SP1 are required.

②.sqlite-netFx35-binary-Win32-2008-1.0.79.0.zip

引用内容
This
binary package contains all the binaries for the x86 version of the
System.Data.SQLite 1.0.79.0 (3.7.10) package. The Visual C++ 2008 SP1
runtime for x86 and the .NET Framework 3.5 SP1 are required.

我在项目引用的是第②个zip中的System.Data.SQLite.dll,运行出错,改为引用第①个zip中的System.Data.SQLite.dll即可正常运行。

C#使用SQLite出错:无法加载 DLL“SQLite.Interop.dll”,找不到指定的模块的更多相关文章

  1. Noesis.Javascript.dll 引用时报错“找不到指定的模块”

    Could not load file or assembly 'Noesis.Javascript.dll' or one of its dependencies. 找不到指定的模块. 通过反编译发 ...

  2. scrapy(创建scrapy工程)报错:“ ImportError:DLL load failed:找不到指定的模块”

    先要确定什么模块找不到 解决方法 windowa环境下加 ( --user) pip install -I cryptography --user

  3. 无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)

    SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块 近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部署到测试 ...

  4. SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块

    近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部署到测试环境时报无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块. (异常来 ...

  5. C#调用SQLite报错:无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块

    C#调用SQLite数据库,有些情况下会报以下这个错误: 无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块 实际上程序目录中是存在SQLite.Interop.dll这个文 ...

  6. 告别加载dll 出错开机加载项大揭秘

    提到开机加载(load)项,大家不要以为就是系统启动(run)项.最简单的例子是,杀毒软件或者用户手动删除病毒文件后,注册表中的自动加载信息仍在,登陆系统时就会提示"加载*dll出错,系统找 ...

  7. (转)SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块

    本文转载自:http://www.cnblogs.com/muzhiye/p/4284070.html 近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部 ...

  8. SQLite 解决:Could not load file or assembly 'System.Data.SQLite ... 试图加载格式不正确的程序/or one of its dependencies. 找不到指定的模块。

     Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. 找不到指定的模块. 错误提示 ...

  9. c# 无法加载 DLL xxxxxxxx找不到指定的模块。 (异常来自HRESULT:0x8007007E)。的一个解决方法

    最近在做一个程序,想把某些功能用C++写成DLL供C#调用.但是无法如何都无法调用,提示"无法加载 DLL xxxxxxxx找不到指定的模块. (异常来自HRESULT:0x8007007E ...

随机推荐

  1. 【原】.Net之美学习笔记-第1章-1.1.1值类型

    结构还有一个特性:调用结构上的方法前,需要对其所有的字段进行赋值.

  2. jquery验证手机号码、邮箱格式是否正确示例代码

    本文为大家介绍下使用jquery验证邮箱.验证手机号码,具体实现思路及代码如下,感兴趣的朋友可以学习下 复制代码代码如下: //jquery验证邮箱  function checkSubmitEmai ...

  3. centos不能挂在ntfs

    root@s 下载]# mount /dev/sdb1 /mnt mount: unknown filesystem type 'ntfs' wget http://www.tuxera.com/co ...

  4. (转载)c++builder/delphi中透明panel及透明窗口的实现方法_delphi教程

    c++builder/delphi中透明panel及透明窗口的实现方法_delphi教程 可能大多数程序员会问:透明窗口,特别是透明Panel有什么应用价值呢?可别小看它们哦,下面我就来讲讲他们的巨大 ...

  5. 【软件分享】文本对比工具 Beyond Compare

    转载自公众号:EmbeddDeveloper 对嵌入式感兴趣可以关注原作者博客: http://blog.csdn.net/ybhuangfugui 此处转载为分享用 Ⅰ.摘要 Beyond Comp ...

  6. C# - ref & out

    引用参数和值参数 值参数,是在函数中此变量的任何修改都不影响函数调用中指定的参数,除非把它当作返回值返回,经典例子,交换两个数,但是返回值只有一个. 此时可以用引用参数,函数处理的变量和函数调用中使用 ...

  7. 常用javascript代码片段集锦

    常用方法的封装 根据类名获取DOM元素 var $$ = function (className, element) { if (document.getElementsByClassName) { ...

  8. C#.net调用axis2webService

    用C#.net调用axis2webService的时候需要引用web服务, 比如访问地址为:http://111.21.32.213:8080/axis2/services/AdService/get ...

  9. DataGridView自动行号

    最近又用了一下DataGridView控件,需要显示行号,我们知道在.net中DataGridView控件默认是不显示行号(数据的记录行数)的,后来通过查资料发现可以在DataGridView控件的R ...

  10. uva 165 Stamps

    题意: 现有k种邮票面额, 一封信上最多贴h张邮票. 求能贴出的最大连续区间,即[1, max_value]这个区间内的所有面额都能贴出来. 并输出k种面额, h + k <= 9. 思路: 这 ...