Click here to Skip to main content
15,923,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
While trying to connect to oracle database from .net getting the following exception:

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

After going through many links i tried to overcome this exception by changing the platform target to Any CPU.When i changed the target platform it is working fine.

Since the application uses Clearquest and HPQC dlls and they are of 32 bits and when i am using it with platform target as any cpu or x64 , getting exception as

"Retrieving the COM class factory for component with CLSID {94773112-72E8-11D0-A42E-00A024DED613} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."


The environment on which i am working is: Windows server 2008,
.net framework 4.0, oracle 11g (64-bit)

can anyone tell me.how to fix it?
Posted

1 solution

If clearquest is only available as 32bit dlls you obviously can't run it under 64 bits.

Set your projects targetCPU to x86 and install the 32 bit Oracle Client.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900