Non_k
Non_k

Reputation: 57

System.BadImageFormatException while connecting to DB2 from .Net

I have DB2 server that I'm trying to connect from my machine, but I keep getting the below error when I start the application, before even start the connection

System.BadImageFormatException: 'Could not load file or assembly 'IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208' or one of its dependencies. An attempt was made to load a program with an incorrect format.'

please not that I don't have DB2 driver installed on my machine. but I refer to the below libraries in my application, which I got them from DB2 database server.

Upvotes: 0

Views: 1280

Answers (1)

PinBack
PinBack

Reputation: 2564

Normally the error message is caused by a 32/64 bit conflict.

Your program could be compiled in 64 bit (or any) and the drivers in 32 bit or the other way round.

Check the Configuration Manager and set the Platform to x86 or x64.

Upvotes: 3

Related Questions