0

So there is this cool database called firebird, and it can be used embedded. the .net provider (as far as I understand) it uses the fbembed.dll, which comes in 2 flavors: 32 and 64 bits.

How does the .net data provider locates the correct one for the environment that is running in?

JorgeLeo
  • 115
  • 9

1 Answers1

2

It does not select by itself. You have to have that 32bit/64bit dll in the current folder for the provider to load.

If the application is running in 32bit environment (32bit application in 32/64bit OS or AnyCPU application in 32bit OS), the provider will load DLL and expect it to be 32bit. Otherwise you will get bad image format error. Same applies for 64 bit environment.

For this reason, I always create MSI's of my application in two flavours - one with 32 bit dll and other with 64 bit. The application itself remains the same (AnyCPU) so the OS determines what DLL is required. I have been using Firebird embedded for more than 8 years now, and that practice has been easiest for me to follow.

Vijay Gill
  • 1,508
  • 1
  • 14
  • 16