C#使用SQLite出错:无法加载 DLL“SQLite.Interop.dll”,找不到指定的模块
在SQLite官方下载了System.Data.SQLite,编写如下测试代码:
{
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处提示:

解决方法
我下载的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
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
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”,找不到指定的模块的更多相关文章
- Noesis.Javascript.dll 引用时报错“找不到指定的模块”
Could not load file or assembly 'Noesis.Javascript.dll' or one of its dependencies. 找不到指定的模块. 通过反编译发 ...
- scrapy(创建scrapy工程)报错:“ ImportError:DLL load failed:找不到指定的模块”
先要确定什么模块找不到 解决方法 windowa环境下加 ( --user) pip install -I cryptography --user
- 无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)
SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块 近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部署到测试 ...
- SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块
近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部署到测试环境时报无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块. (异常来 ...
- C#调用SQLite报错:无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块
C#调用SQLite数据库,有些情况下会报以下这个错误: 无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块 实际上程序目录中是存在SQLite.Interop.dll这个文 ...
- 告别加载dll 出错开机加载项大揭秘
提到开机加载(load)项,大家不要以为就是系统启动(run)项.最简单的例子是,杀毒软件或者用户手动删除病毒文件后,注册表中的自动加载信息仍在,登陆系统时就会提示"加载*dll出错,系统找 ...
- (转)SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块
本文转载自:http://www.cnblogs.com/muzhiye/p/4284070.html 近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部 ...
- 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. 找不到指定的模块. 错误提示 ...
- c# 无法加载 DLL xxxxxxxx找不到指定的模块。 (异常来自HRESULT:0x8007007E)。的一个解决方法
最近在做一个程序,想把某些功能用C++写成DLL供C#调用.但是无法如何都无法调用,提示"无法加载 DLL xxxxxxxx找不到指定的模块. (异常来自HRESULT:0x8007007E ...
随机推荐
- javascript 上传 预览图片 兼容 谷歌 ie
最近的项目要用到这块,但是在网上找了很多资料,很多都是假的,都不行,最后终于找到一个,还是可以兼容主流的,特分享给大家,可以用 <!DOCTYPE html PUBLIC "-//W3 ...
- SQL Server 2012 读写分离设置
SQL Server 2012 读写分离设置 - AlsoIn 时间 2014-07-21 17:38:00 博客园-所有随笔区 原文 http://www.cnblogs.com/also/p/ ...
- js:合同-已知起始日期、年限,自动计算截止日期
dateAddYear('2016-01-01', '3') ;//返回:2018-12-31 浏览器:ie11,ff 46.0.1(成功)360v8.1(急速模式,成功) 浏览器:360v8.1(兼 ...
- PHPCMS如何实现后台访问限制?
修改phpcms 后台管理路径,可以有效的防止因为程序漏洞,或者是服务器安全问题所带来的 phpcms系统管理权限被黑客获取 文件路径:/caches/config/system.php 修改:'ad ...
- Python基于比较的排序
排序是算法学习中最基本的问题. 1.平均时间复杂度均为O(N2)的排序 1.1 插入排序 插入排序对少量元素的排序非常有效.工作机制就像打牌一样,为了将牌插入到已排好序的牌中,需要将牌与手中的牌从右向 ...
- Codeforces 612E - Square Root of Permutation
E. Square Root of Permutation A permutation of length n is an array containing each integer from 1 t ...
- 利用 runtime,解决多次点击相同 button,导致重复跳转的问题-b
当app有点卡的时候,多次点击相同的button,经常出现,跳转了N次相同的界面(比如闲鱼) 解决办法 用运行时和分类,替换 UIControl 响应事件,根据响应的间隔时间来判断是否执行事件. 详细 ...
- c# 获取MP3和AMR文件格式的时长
//网上摘录整理private long GetAMRFileDuration(string fileName) { ; FileStream fs = new FileStream(fileName ...
- 使用text-overflow:ellipsis对溢出文本显示省略号有两个好处
使用text-overflow:ellipsis对溢出文本显示省略号有两个好处,一是不用通过程序限定字数:二是有利于SEO.需要使用对对溢出文本显示省略号的通常是文章标题列表,这样处理对搜索引擎更友好 ...
- 南方数据企业0day
漏洞影响版本 v10.0 v11.0 关键字:inurl:”HomeMarket.asp” 默认后台:/admin 直接爆用户密码: http://www.xxx.com/NewsType.asp?S ...