c# - 使用 SQLite 调试 x64
问题描述
我在项目中使用 SQLite
我测试过:
System.Data.SQLite.x64
System.Data.SQLite
当我想在 x64 中调试时出现错误这是必要的,因为我在 x64 中使用了外部 DLL ( DllImport
)
SQLite error (1): no such table: MAIN in "SELECT ID FROM MAIN"
Exception thrown: 'System.Data.SQLite.SQLiteException' in System.Data.SQLite.dll
An exception of type 'System.Data.SQLite.SQLiteException' occurred in System.Data.SQLite.dll but was not handled in user code
SQL logic error
no such table: MAIN
怎么了?
解决方案
欢迎来到 SO!
听起来您加载了错误版本的 DLL,我自己过去也遇到过这样的问题。确保在运行时检查您是在 32 位还是 64 位模式下运行,然后加载适当的 DLL。更好的是,运行 NuGet Manager 并从那里将 SQLite 添加到您的项目中,该版本支持两者。
推荐阅读
- naming - 是否有变量命名约定
- r - 更改 R 中的 scattermapbox 符号
- c# - 如何组合两个不同类型的列表?
- git - 仅当该仓库中存在未在管道定义中配置的 git 提交时才触发 Jenkins 构建
- google-chrome - 如何在 WebdriverIO 测试中避免 chrome 外部对话框
- python - ValueError:检查目标时出错:预期的 dense_22 具有 3 个维度,但得到的数组形状为 (1600, 2)
- lua - 如何使用 Lua 建立与“ttgo t call esp32 sim800L”的互联网连接
- android - 正常扫描二维码后,停止运行,无法显示扫描内容:
- python - 在 Python 中使用 pandas 库读取 .xlsx 文件时出错?
- json - 如何在 Github 上以 JSON 格式获取用户的项目列表