This content has been marked as final. Show 6 replies
The error you're getting tends to come up when you have an Oracle.DataAccess.dll from one version of Oracle, and the unmanaged Oracle client on the machine is a different version. A typical culprit is Copy Local = True on your Oracle.DataAccess reference in your project. Try changing that to false, then doing a Clean & Rebuild on the project. Then delete everything off test and redeploy.
That said, how are you installing ODP.net 2 vs 4? Both of them come in the same install package. The trick here is that Test should have the same version of the Oracle client software that Dev has, or as close to it as possible. That installation will set up ODP.net for you.
I don't have the Oracle.DataAccess.dll in bin/Debug. Once I copied it manually to try out if it works, but no success.
I install ODP.net 2 this way: install.bat odp.net2 c:\oracle oracle_home
then uninstall and install ODP.net 4 in the same way: install.bat odp.net4 c:\oracle oracle_home
I've installed the same oracle client (using exactly the same zip) to my TEST and DEV envs
Still sounds like your main Oracle client isn't installed correctly and Oracle.DataAccess.dll is acting up because of that. Try it with basic to make sure the Instant Client is installed, or grab the version that uses the universal installer and run that instead. I know that version works, I'm using it right now. :)
Could you send me step-by-step instructions? - I'm quite new in .Net and have no clue how to check that the main Oracle client is installed.
What do you mean on " Instant Client"?
The Oracle client for .net comes in two pieces. There's the .net part (Oracle.DataAccess.dll and some related files), and the "native" part (the Oracle client). Both of them need to be installed for things to work. The error you're getting happens when the .net part and the native part aren't the same version.
For my money, the simplest way to get up and running is to use the universal installer version, instead of the xcopy one. So remove the Oracle clients you have right now. Download the first package here: http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
Unzip it, run setup, and it will install everything you need.
U R right, thanks a lot!