0

系统类型:64 位操作系统,基于 x64 的处理器

前端:MS Visual Studio 2010

后端:Firebird 数据库 v2.5.0 64 位服务器类型:嵌入式类型(注意:独立服务器 v2.5.0 也存在于我的系统中) Firebird .NET Provider v2.5.0

注意:我使用这么旧版本的 VS 和 Firebird 数据库有一些特殊的原因

项目平台目标:x64

运行我的应用程序时,我收到错误:

试图加载格式不正确的程序(HRESULT 异常:0x8007000B)

在添加连接-> TableAdapter 配置向导中,服务器类型为嵌入式时会产生上述错误,但服务器类型为独立时没有错误。

我的 app.config 看起来像:

<?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="dbConFirebirdSQL" connectionString="User=SYSDBA;Password=masterkey;Database=INSMANEMBED.fdb;DataSource=localhost;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=1;"/>
  </connectionStrings>
  <system.data>
    <DbProviderFactories>
      <remove invariant="FirebirdSql.Data.FirebirdClient"/>
      <add name="FirebirdSql.Data.FirebirdClient" invariant="FirebirdSql.Data.FirebirdClient" description="Firebird Data Provider for .NET" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
    </DbProviderFactories>
  </system.data>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

bin\debug 中存在的一些文件是

  • fbembed.dll
  • 火鸟.conf
  • 火鸟.msg
  • ib_util.dll
  • icudt30.dll
  • icuin30.dll
  • icuuc30.dll
  • msvcp80.dll
  • msvcr80.dll
  • Microsoft.VC80.CRT.manifest
  • 国际

我搜索了互联网,他们说如果DLL的位数不同,可能会发生这种错误。所以使用命令 dumpbin /headers C:\path\name.dll,我开始检查哪个 DLL 是 32 位/64 位的。最后我找到了有问题的 DLL。FirebirdSql.Data.FirebirdClient 是 32 位的,而其余的是 64 位的。

现在我的问题是我再次在互联网上重新搜索了 64 位版本的 FirebirdSql.Data.FirebirdClient,但没有找到。都是32位的。

请告知我现在应该怎么做。

4

0 回答 0