Errors connecting to Oracle via Devart on new machine (urgent please help)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
inspectorDev
Posts: 19
Joined: Mon 04 Jan 2016 15:04

Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by inspectorDev » Mon 15 Feb 2016 16:27

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();
}

inspectorDev
Posts: 19
Joined: Mon 04 Jan 2016 15:04

Re: Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by inspectorDev » Mon 15 Feb 2016 19:53

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).

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by Pinturiccio » Tue 16 Feb 2016 13:34

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.
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 wish the error from devart was a little clearer (if it's possible for it to know what this problem was).
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
Posts: 19
Joined: Mon 04 Jan 2016 15:04

Re: Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by inspectorDev » Wed 17 Feb 2016 18:20

Great, I am glad to hear that.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by Pinturiccio » Wed 24 Feb 2016 11:26

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.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by Pinturiccio » Fri 26 Feb 2016 10:07

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

Andrei Lisin
Posts: 6
Joined: Wed 25 Sep 2013 14:06

Re: Errors connecting to Oracle via Devart on new machine (urgent please help)

Post by Andrei Lisin » Thu 24 Mar 2016 09:29

inspectorDev wrote:The default is "AnyCPU" and that apparently compiled it to 32bit
That's new feature of .net 4.5 target.

Post Reply