c# - 在启用 FTS5 的已发布 VSTO 应用程序中,System.Data.SQLite 查询执行失败
问题描述
在我的 VSTO 应用程序中,我使用 sqlitefts5
模块。在开发机器上,应用程序工作正常,但是当我发布它并尝试执行 SELECT 查询时 - 没有发生任何事情(甚至没有抛出异常!)!
这是我的代码:
try
{
using (SQLiteConnection connection = new SQLiteConnection(connectionstring))
{
using (SQLiteDataAdapter adapter = new SQLiteDataAdapter("SELECT * FROM Categories order by Name", connection))
{
adapter.Fill(Globals.ThisAddIn.Categories_Table); //here is the line where the code execution goes to infinity
}
}
}
catch (SQLiteException ex)
{
MessageBox.Show($"{ex.Message}\nError code: {ex.ResultCode}\nHResult: {ex.HResult}\nSource: {ex.Source}\nStack trace:\n{ex.StackTrace}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ex)
{
MessageBox.Show($"{ex.Message}\nHResult: {ex.HResult}\nSource: {ex.Source}\nStack trace:\n{ex.StackTrace}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
无论是否安装了 NugetSystem.Data.SQLite.Core.FTS5
包,它都无法在客户端机器上运行。
我使用“任何 CPU”配置和System.Data.SQLite
nuget 包。开发和客户端计算机都使用 Office 64 位。
是否有任何解决方案可以使FTS5
模块在客户端机器上工作?
解决方案
推荐阅读
- git - 如何从远程仓库中的 master 删除 GIT 分支并从另一个分支启动新分支?
- sonarqube - 在 mac 中找不到 sonar-scanner 命令
- reactjs - 如何使用 Material UI 自动完成和反应钩子填充多个输入字段的值
- php - 保护 APP_KEY 以进一步加强 Laravel 中的加密
- python - 如何从 pandas 生成 CSV 文件并将其返回到 django 视图?
- python - (discord.py)403 禁止(50001)在尝试删除消息时丢失访问错误,尽管拥有所有权限和意图
- rust - 从 cli app 中的应用程序目录读取文件
- c# - 如何在 JSON 的帮助下保存列表?
- python - 我如何更改此代码以抓取表格
- java - 工具栏徽标不可点击但仍可用作抽屉