Reputation: 837
I'm trying to study ORP.net and looking over this article on Deploying ODP.NET with Oracle Instant Client. I have downloaded and copied all DLLs in project as the article explains, however on the testing step, when the app is built I get the following error:
OCIEnvCreate failed with return code -1 but error message text was not available
I am using oraclexe
and I have an Oracle client. I have given full permission for authenticated users. How can I solve this problem?
Upvotes: 5
Views: 48130
Reputation: 380
In my case I have oracle client on the server but it was 64bit and the application run as 32bit.
Installing also 32bit (+add the folder to the path) fixed the problem.
Upvotes: 0
Reputation: 1
I also had the same issue when trying to connect Power BI to a Oracle database.
I had 2 versions of the Oracle client installed. 11.2 and 10.2. When I uninstalled the older version, it worked like a charm.
One thing to note is that in Power BI, when connecting to the oracle database it asked me to provide the server. But what is expects me to enter is the name of that connection in my tnsnames.ora file :)
Upvotes: 0
Reputation: 2611
I also had to make symbolic directory links for x86 and x64 applications. The steps I had to take were as follows:
Upvotes: 0
Reputation: 7113
What worked for me was setting ORACLE_HOME
to oracle\client\your_version\home1
instead of oracle\client\your_version\home1\BIN
Upvotes: 4
Reputation: 639
Reinstalling Oracle and updating the ORACLE_HOME
environment variable with the new installation folder worked for me.
Don't forget to recycle your application pool before trying your application again.
Upvotes: 1
Reputation: 86
When trying to connect to an Oracle database you receive the following error:
OCIEnvCreate failed with return code -1 but error message text was not available
The causes:
You are using an unsupported version of the Oracle Client (older than 11.2) on Windows 7.
DLLs from a previous installation of Oracle Client have been left on the system, causing a conflict.
The solutions:
Install a supported version of the Oracle Client.
Perform a search for "OCI.DLL" on the local machine. If you find any instances of this file in any location other than your ORACLE_HOME
rename or delete it. If in doubt, uninstall the Oracle Client, then perform the search again. Anything that is leftover is the culprit.
Upvotes: 6