title: Firebird: An attempt was made to load a program with an incorrect format (Exception from HRESULT:0x8007000B)
body: <p>System Type: 64-bit OS, x64-based processor</p>
  
  <p>Front End: MS Visual Studio 2010</p>
  
  <p>Backend: Firebird database v2.5.0 64-bit Server type: Embedded type (NOTE: Standalone Server v2.5.0 is also present in my system)
           Firebird .NET Provider v2.5.0</p>
  
  <p>NB: There are some special reasons why I'm using such old version of VS &amp; Firebird database</p>
  
  <p>Project Platform target: x64</p>
  
  <p>When running my application, I get the error:</p>
  
  <blockquote>
    <p>An attempt was made to load a program with an incorrect format (Exception from HRESULT:0x8007000B)</p>
  </blockquote>
  
  <p>The above error is generated when in Add Connection-> TableAdapter Configuration wizard and Server type is Embedded, however there is no error
  when the server type is Standalone.</p>
  
  <p>My app.config looks like:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;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;"/&gt;
    &lt;/connectionStrings&gt;
    &lt;system.data&gt;
      &lt;DbProviderFactories&gt;
        &lt;remove invariant="FirebirdSql.Data.FirebirdClient"/&gt;
        &lt;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" /&gt;
      &lt;/DbProviderFactories&gt;
    &lt;/system.data&gt;
  &lt;startup&gt;&lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>Some files present in bin\debug are</p>
  
  <ul>
  <li>fbembed.dll</li>
  <li>firebird.conf</li>
  <li>firebird.msg</li>
  <li>ib_util.dll</li>
  <li>icudt30.dll</li>
  <li>icuin30.dll</li>
  <li>icuuc30.dll</li>
  <li>msvcp80.dll</li>
  <li>msvcr80.dll</li>
  <li>Microsoft.VC80.CRT.manifest</li>
  <li>intl</li>
  </ul>
  
  <p>I searched the internet and there they are saying that such error may occur if there is difference of bitness of DLL. So using the command
  <code>dumpbin /headers C:\path\name.dll</code>, I began to check which DLL is 32-bit/64-bit. And at last I found the offending DLL. It's the FirebirdSql.Data.FirebirdClient which was 32-bit while the rest were 64-bit.</p>
  
  <p>Now my problem is that I again searched the internet all over again for the 64-bit version of FirebirdSql.Data.FirebirdClient but could find none. All are
  of 32-bit.</p>
  
  <p>Please advise what should I do now.</p>