OracleCLient Provider : BadImageFormetException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
JeanR
Posts: 22
Joined: Fri 20 Jul 2007 17:54

OracleCLient Provider : BadImageFormetException

Post by JeanR » Thu 08 Apr 2010 10:51

Hello,

i have a little difficult on my development station, i can't use dotConnect for oracle, i always get the

"Attempt to load Oracle client libraries threw BadImageFormatException.
This problem will occur when running in 64 bits mode with the 32 bits Oracle client componenents installed."

- i'm under Windows Seven 64bits
- i have installed Oracle 64Bits (Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64))
- i test with the free version of dotConnect Universal

[EDIT] -> under the .cs code the connection is working, i have this error only using the visual studio IDE (Server Explorer/Data connection/Add connection)

any idea ? :roll:

Many thanks !

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 09 Apr 2010 15:57

The mode of your application's assembly (you can find out the mode with Windows Task Manager) should be the same as the mode of your Oracle Client. So if you are connecting to your Oracle Server via the 32 bit Oracle Client, you should compile your application in the x86 mode. Otherwise, you can compile your application in the x64 mode, and connect to your server in the Direct mode (without using Oracle Client).

Visual Studio is run in the x86 mode. So it should work via its designers with the 32 bit Oracle Client. Have you tried to connect via Server Explorer using the Direct mode?

JeanR
Posts: 22
Joined: Fri 20 Jul 2007 17:54

Post by JeanR » Sat 10 Apr 2010 02:50

Dear Shalex,

Thanks for the clear answer !
Because i'm using the free version of dotConnect universal, i think that i can't use the direct mode ("Oracle" in the provider list isn't it?).

But you'r answer helped me a lot.

Cordially,
Jean

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 12 Apr 2010 12:12

dotConnect Universal Standard (free edition) doesn't include assemblies of dotConnect for Oracle and cannot work with dotConnect for Oracle Express. So you can use either bundled OracleClient (works only via OCI), or install dotConnect for Oracle separately (refer here for the editions that support the Direct mode).

Post Reply