首页 技术 正文
技术 2022年11月16日
0 收藏 307 点赞 3,152 浏览 1390 个字

在使用System.Data.SQLite的过程中,遇到各种问题,特此记录下。(都被搞的折寿了,不仔细看文档的下场!)

1.选对.net Framework的版本。
2.X64和X86的问题,如果项目指定了X64或者X86,则下载对应的SQLite。如果选择AnyCpu,最简单的办法是在程序运行目录下创建X64和X86目录,里面放对应的SQLite.Interop.dll。System.Data.SQLite.Dll会根据程序平台自动选择。
3.关于Visual C++ XXXX runtime的问题,因为SQLite是VC++开发,所以必须安装对应的Visual C++ XXXX runtime。如果电脑没有这个东西,则会出错。
4.还是Visual C++ XXXX runtime的问题(被恶心到了)。但是有的用户电脑已经安装了这玩意,还是会提示“Unable to load DLL ‘SQLite.Interop.dll’: 找不到指定的模块”的异常。怎么回事呢,我也不懂C++,貌似是什么静态连接的问题。
下载“Precompiled Statically-Linked Binaries for 64-bit Windows ”这种版本就可以了。 通过下载发现static版本的DLL都要大一些。

下面是官方对static的解释:
All the "static" packages contain either native or mixed-mode assembly binaries linked statically to the appropriate version of the Visual C++ runtime. Typically, these packages are used in cases where customer machines may not have the necessary version of the Visual C++ runtime installed and it cannot be installed due to limited privileges.

大概就是上面的意思。

"bundle"版是把System.Data.SQLite.dll和SQLite.Interop.dll打包一起的版本。
相关链接:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
http://www.cnblogs.com/zhuweisky/p/3844089.html

2018/11/7 补充

升级版本后,发现本地运行没有问题,在服务器上会报“ 未能加载文件或程序集“System.Data.SQLite.dll”或它的某一个依赖项。找不到指定的模块
文件名:“System.Data.SQLite.dll”。找不到指定的模块”。 原因如上面第四点所说,没有装vc++runtime,下载链接(Microsoft Visual C++ 2010 SP1 Redistributable Package (x86))[https://www.microsoft.com/en-us/download/details.aspx?id=8328]

另外一个不需要安装的方式,就是把“msvcr100.dll”这个dll放到程序目录下,之前程序版本为啥不用呢? 因为在xulrunner目录下已经存在这个文件了。- -!!

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,075
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,551
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,399
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,811
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,893