To the best of my knowledge, the personal web server that gets invoked when debugging in VS is a 32 bit process, so you'd need to have 32 bit client installed. You should be able to check the processes tab in task manager to confirm/deny that. If the process name has *32 next to it, it's 32 bit.
While the error message states "This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed", it happens the other way around as well.
Hope it helps, corrections/comments welcome.
Edited by: gdarling on May 31, 2012 3:20 PM
The task does not show that it is running in 32 bit mode. However, I installed the 32 bit version of Oracle and that error message went away. Looks like the error message is not entirely accurate. It should state "32 bit mode with the 64 bit Oracle client installed".
Thank you for the assistance.
I seem to have had a problem very similar to yours. Same VS, Windows 7, error message, etc. I fixed it by unloading the reference C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Data.OracleClient.dll from my VS2010 project and replacing it with C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.OracleClient.dll Note the Framework instead of Framework64. The filenames and properties are the same so you wouln't know which version you were running unless you knew where it came from.
So, If I want to install ODAC 32bit on Windows Server 2003 64bit,will it connect to Oracle database?
Your 32 bit applications will, yes.
(Note that the rest of this thread mentions System.Data.OracleClient, which is something else entirely. That's a Microsoft supplied provider that is no longer supported. It's not the same thing as installing ODAC.)
1. Visual Studio any version is 32 bit ONLY irrespective of hardware or OS bits. So to DEVELOP with Oracle Client you MUST install 32 bit Oracle ODAC components. Task manager will show devenv.exe *32 (to confirm 32 bit Visual Studio application).
2. You can run your web application inside IIS/IIS Express in your PC which independently can be either 32bit or 64bit. If it is 64 bit, you MUST also install 64 bit Oracle ODAC components which means you'll have to install both 32bit and 64bit in your 64 bit Win7 running on 64bit hardware.
3. In Visual Studio if you compile with "AnyCPU" as target, the resultant binaries (Web/NonWeb) can be both 32bit or 64bit. So if target PC is "AnyCPU" or "x64", you MUST install Oracle ODAC 64 bit in the target OS if that target OS is 64bit. You don't have to install 32bit ODAC in the target PC.
4. One more catch to above scenario is the target OS could be 64bit simulated OS on a 32bit hardware. In such case you MUST install both 32bit and 64bit ODAC components.
So while you ask your network team to download ODP.NET/ODAC Components make sure you ask them to download both 32bit and 64bit. Total nearly 600MB.
Hope this helps many people out there.
And now there is ODP.NET fully managed driver, which does not care if the OS is 32-bit or 64-bit.