Page 1 of 1

Selecting x86 and x64 client

Posted: Tue 19 Jan 2010 12:29
by aldare
Hi,

I've got a web application that uses Entity Framework. I need to be able to select one of two clients (orahomes) - either orahome with x86 or another orahome with x64 Oracle client. I've installed both Oracle client versions, one orahome is called Ora86 and another Ora64.

When I set "Home" parameter in connection string to "Ora64" then everything works correctly. If I set it to Ora86 then I get an error "Can not find Oracle home".

I tried to create Windows application and used the OracleConnection control. When I tried to configure it, it has shown (in the property box) only orahome Ora86 and didn't allow to use the 64bit version.
Then I looked at the homes by calling :

OracleHomeCollection col = OracleConnection.Homes

and found out this collection is showing only Ora64 home and Ora86 is missing.

This behavior is a bit weird and I am very confused. Could anyone help and tell me why various methods are returning various orahomes but none can provide them all? Is there a way how to configure which orahome (x64 or x86) the entities will run against?

Thank you for any help

Posted: Tue 19 Jan 2010 15:42
by Shalex
The process that is run in the 64-bit mode can use only Ora64, and the 32-bit process can work only with Ora86:
1) the version of Oracle client that can be used by your assembly is defined by the mode it will be running in (x86 or x64);
2) please refer to your Windows Task Manager; probably, your Visual Studio is running in the 32-bit mode. As a result, only Ora86 is available in design time;
3) you have checked OracleHomeCollection in run time when your assembly was executed in the 64-bit process. So, only Ora64 was available in this case.