Although I have been installed oracle client in my server I got the following error
OCIEnvCreate failed with return code -1
When I tried to use oracle client to access oracle database in SharePoint Visual WebPart.
I investigated this issue by creating a new windows application and also ASP.Net web application then using the same current installed oracle client dll that has been worked properly.
The current installed oracle client is 32 bit that not supported with SharePoint.
- Try to download Oracle Client for Microsoft Windows (x64) through
- Install Instant Oracle Client x64.
- Install Oracle Data Provider.
How you can install Oracle Data Provider ?
- Open Command Prompt.(Run > cmd )
- Navigate to Oracle Data Provider path at your local server then type
c://Path of your installed clientthen home name
- Open Visual Studio > Solution Explorer > Right Click Add Reference > Browse the installed client path “C:\app\XXX\product\11.2.0\client_2\odp.net\bin\2.x“
- Select Orcale.DataAccess.dll.
- Deploy the Visual WebPart that should be now deployed successfully.
Note : To get the installed client path.
- Go to Run > Type regedit > Navigate to LOCAL_MACHINE – SOFTWARE – ORACLE > The Oracle client home name.