You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET Firebird客户端连接报错System.BadImageFormatException求助

System.BadImageFormatException (0x8007000B) 连接Firebird SQL的排查与解决

问题症状

调用KPS_DSR_Updater.DAL.CreateConnecton方法尝试建立Firebird SQL连接时,持续触发System.BadImageFormatException,错误信息:

An attempt was made to load a program with an incorrect format. (0x8007000B)

已尝试但无效的排查操作:

  • 通过配置文件动态构建连接字符串
  • 直接硬编码连接字符串
  • 完全复刻生产环境中可正常运行的代码逻辑

根本原因与解决方法

根本原因

程序运行位数(64位)与已安装的Firebird ODBC驱动位数不匹配,导致驱动无法被正确加载。

解决步骤

  1. 确认程序的运行位数(本例为64位)
  2. 下载并安装对应64位版本的Firebird ODBC驱动
  3. 重新配置连接使用新的64位驱动,重启程序后连接即可正常建立

内容的提问来源于stack exchange,提问作者James Clarke

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 15:42:02