After I installed ODP.NET 11g ODTwithODAC1110621.zip in Windows Server 2008 x64 I got the following error message:
Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format. (http://forums.oracle.com/forums/thread.jspa?messageID=2732111)
So, I changed the ODP.NET 10g ODTwithODAC10202.exe. Well, there was no luck and I was still getting the same error message from Visual Studio 2008.
Thanks to Mark William answered my question in the forum http://forums.oracle.com/forums/thread.jspa?threadID=706071&tstart=0.
Finally, Oracle.DataAccess.dll is able to open the connection to connect to Oracle Database 11g without an error. At the same time can create Data Sources without error too.
Somehow, in order to do that, I need to install both Oracle Client for Windows Server 2008 x64 and Oracle Client for Windows Server 2008 x86 download from the following link:
http://www.oracle.com/technology/software/products/database/index.html
Comments (1)
Hi Chan, i had the same error.
The solution i found was to change the platform target to "x86" in visual studio compilers settings and finally it worked !! . I think Visual Studio 2008 has some problems with assemblies in 64 bits.
Posted by Mredison | July 3, 2009 1:21 PM
Posted on July 3, 2009 13:21