Hello, I have an urgent issue. I have a new machine on which Devart dotConnect for Oracle and Oracle Client 11g is installed . Yet, when I ran my application, I got the following error:
"Can not obtain Oracle client information from registry. Make sure that Oracle Client Software is installed, or use Direct mode of connecting to server."
Source of error: Devart.Data.Oracle
Stack Trace: at Devart.Data.Oracle.OracleHomeCollection.a()
at Devart.Data.Oracle.OracleInternalConnection..ctor(b2 connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.aq.a(m A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, m A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
Does anyone here have any insight into this? Here is my c# code that resulted in the error (note- I checked my tnsnames.ora file and it has the exact same entry as my local dev machine, which works):
connectionString = "data source=MyDevTNS;User ID=***;Password=******;persist security info=false;
using (OracleConnection connection = new OracleConnection(connectionString))
{
connection.Open();
}
Errors connecting to Oracle via Devart on new machine (urgent please help)
-
- Posts: 19
- Joined: Mon 04 Jan 2016 15:04
-
- Posts: 19
- Joined: Mon 04 Jan 2016 15:04
Re: Errors connecting to Oracle via Devart on new machine (urgent please help)
BY THE WAY, I solved the problem. In case anyone has this problem, I had to change the Platform Target in Visual Studio 2013 (in Project Properties > Build) to x64. The default is "AnyCPU" and that apparently compiled it to 32bit, and was the cause of the error.
I wish the error from devart was a little clearer (if it's possible for it to know what this problem was).
I wish the error from devart was a little clearer (if it's possible for it to know what this problem was).
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Errors connecting to Oracle via Devart on new machine (urgent please help)
The bitness (x86 or x64) of your application and the bitness of your Oracle Client must be the same. We are glad to hear that you found a solution.inspectorDev wrote:I had to change the Platform Target in Visual Studio 2013 (in Project Properties > Build) to x64. The default is "AnyCPU" and that apparently compiled it to 32bit, and was the cause of the error.
Thank you for your feedback. We will extend the exception text and add mention that the bitness (x86 or x64) of the application and the bitness of Oracle Client must be the same.inspectorDev wrote:I wish the error from devart was a little clearer (if it's possible for it to know what this problem was).
-
- Posts: 19
- Joined: Mon 04 Jan 2016 15:04
Re: Errors connecting to Oracle via Devart on new machine (urgent please help)
Great, I am glad to hear that.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Errors connecting to Oracle via Devart on new machine (urgent please help)
We have improved the exception message in the OCI mode when Oracle Client is not found. We will post here when the corresponding build of dotConnect for Oracle is available for download.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Errors connecting to Oracle via Devart on new machine (urgent please help)
New build of dotConnect for Oracle 8.5.602 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=33273
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=33273
-
- Posts: 6
- Joined: Wed 25 Sep 2013 14:06
Re: Errors connecting to Oracle via Devart on new machine (urgent please help)
That's new feature of .net 4.5 target.inspectorDev wrote:The default is "AnyCPU" and that apparently compiled it to 32bit