32 bit WindowsService not able to connect to Oracle

32 bit WindowsService not able to connect to Oracle

Postby AtulChivate » Fri 21 Oct 2011 13:31

Hi,

on a 64-bit machine, we have created a windowsService. And this windowsservice is created in 32-bit mode using C#(while compiling this windowsService project, we set PlatFormTarget=x86)

I am not able to connect to oracle database with this windowsService. It throws an exception:

"Unable to load C:\Oracle\product\11.2.0\client_1\bin\oci.dll. Please check that you use 32x version of Oracle client with 32x application. DEBUG BUILD: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

But through the windows service, when I use System.data.OracleClient dll to connect to Oracle database, its able to connect. So it seems some issue with Devart component with WindowsService. (WindowsService runs under account: LocalSystem, and might be Devart is failing somewhere)

I have installed Oracle 11 client of both 32/64 bit on this machine. When I execute similar code through console app (with PlatformTarget=x86 i.e. console app compiled for 32-bit mode), its able to create OracleConnection successfully.

Pease help me for this issue.

-atul
AtulChivate
 
Posts: 1
Joined: Fri 21 Oct 2011 13:18

Postby Shalex » Tue 25 Oct 2011 09:36

Please try using the 6.50.237 version of dotConnect for Oracle, in which the bug with filtering Oracle clients depending on their capacity is fixed.

If the problem persists with 6.50.237 as well, do the following:
1) if your x86 and x64 OracleHomes have different names, set explicitly the "Home" connection string parameter to the name of OracleHome x86;
2) put the path to OracleHome x86 in the PATH environment variable on the first place;
3) tell us the type of your Oracle client installation (Administrator, InstantClient, etc).
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle