System Type: 64-bit OS, x64-based processor
Front End: MS Visual Studio 2010
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
NB: There are some special reasons why I'm using such old version of VS & Firebird database
Project Platform target: x64
When running my application, I get the error:
An attempt was made to load a program with an incorrect format (Exception from HRESULT:0x8007000B)
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.
My app.config looks like:
<?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>
Some files present in bin\debug are
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
dumpbin /headers C:\path\name.dll, 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.
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.
Please advise what should I do now.
User contributions licensed under CC BY-SA 3.0