How can I connect to an Oracle Database from C# on Windows 7 x64 in my development environment How can I connect to an Oracle Database from C# on Windows 7 x64 in my development environment oracle oracle

How can I connect to an Oracle Database from C# on Windows 7 x64 in my development environment


This could be a OCI client version issue. See https://community.oracle.com/message/11103466.

I have seen a lot of issues with this. Most of the time this has to do with a ODP.NET assembly (such as Oracle.DataAccess) which is in a different version then the operating system architecture (we are talking bits here).

There are a few things you could do about this:

  1. Install both 32- and 64-bit ODP.NET client tools (including OCI for that architecture), free to download from oracle.com.

  2. Build your application for a specific processor architecture, such as 32-bit.

  3. Use a third party Oracle client connector that is not dependent on OCI (this is what gives the problems). I wouldn't recommend this, since this is most of the time the expensive solution.


Oh, the dreaded parenthesis in Oracle provider. The simplest way around it is to use a newer version of the client where the issue was fixed. With Oracle 10g database you can safely use up to 12.1.x client (available here: 64-bit Oracle Data Access Components).

With 64-bit os there's another trick I used: firstly install 32-bit version of the client, and on top of it install 64-bit version. That way some apps like Office or old VS dev web server will still work.