Some more info please:
Are you saying that OracleException::Message is null?
You've indicated all the dlls were pulled from the odac xcopy bundle, but oraociius11.dll isnt in that zip. (IC lite should still work though). There is also no oci.dll with version 184.108.40.206 that I know of.
Anyway, you deployed all of those dlls with the application, and they're found in the same directory the exe is in?
Yes, OracleException.Message is empty. It is derived from OracleException.Errors collection, and the collection is null. I used dotPeek to look into OracleException implementation.
Yes, you are right. I got oraociius11.dll from Oracle Instant Client Basic Light package (http://download.oracle.com/otn/nt/instantclient/112020/instantclient-basiclite-nt-220.127.116.11.0.zip).
Sorry, I accidentally swapped info for Oracle.DataAccess.dll and oci.dll. The list should read:
Yes, the executable and all the DLLs are in the same directory.
Hard to say what might be going on there with the limited info, to be able to tell whether its something like a dependency loading issue, or something like a 12154.
If you use Process Explorer, do you see all of the dll's loaded? If not, and you use Process Monitor, do you see any load failures?
If you use oraociei11.dll that came in the xcopy bundle rather than the IC Lite dll, do you see the same failure?
What if you use the orannzsbb11.dll that comes in the ic lite zip instead of the odac zip?
Thank you, Greg, for trying to help!
In Process Explorer, I see oci.dll, oraociicus11.dll, OraOps11w.dll, and Oracle.DataAccess.dll loaded from the same folder where the executable was started from.
My understanding is that oraociei11.dll is not required. Anyway, copying this DLL changed nothing. The application fails in exactly the same way with no additional information.
Instant Client and ODAC Xcopy bundles contain exactly the same version of orannzsbb11.dll.
Edited by: user5557094 on Jun 13, 2011 12:08 PM
It seems I have solved the problem for the machine where the application always failed. Somehow, the machine had value "NA" in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG registry key. The application started working after adding the following code:
Environment.SetEnvironmentVariable("NLS_LANG", "AMERICAN_AMERICA.UTF8"). Unfortunately, I could not make the application fail on other machines by setting the registry key to "NA", and this worries me. Also, are there any other environment settings I have to override in my application in order to make it "environment agnostic"?
Brilliant! This solved the problem for me that I've been struggling with! When I changed the registry value, code that had just not worked, began working. I'll either fix the registry on the other systems that were plagued by this or use the code to set the env variable to remedy this. Thanks a ton.