1

What is needed for working with Oracle from Visual Studio 2010?

Environment: 1 - On development pc:

Windows 7 Ultimate 64 bit (4 GB ram, Dual-Core 2.6 GHz)

  • Windows 7 Ultimate 64 bit (4 GB ram, Dual-Core 2.6 GHz)
  • Visual Studio 2010 Ultimate
  • ODAC (from package ODTwithODAC112012.zip) (also ODAC10203x64.zip does not install on Windows 7 64)

2 - On server:

  • Windows 2003
  • Oracle 11g (11.2.0.1.0)
  • .NET (2.0, 3.0, 3.5, 4.0) (SPs are installed)

Problem: (Simple) If i create a console app in vs and set .NET version to 3.5 and plateform to x86, it works on development pc but not on the server. If I set plateform to x64 or Any CPU, it does not work; neither on development pc nor on the server (deployed).

I have searched and found there will be .NET 4 support for ODP.NET (64) on December. But I am not compiling to .NET 4.0! But .NET 3.5 (Wich is internally just .NET 2.0). Other tutorials and 'how to's do ignore any problems with 32-64 aspect of this hell!

Many thanks in advance!

1 Answer 1

0

Does the server have the ODP client software installed?

This can be 32 or 64 bit. Compile to ANYCPU and it should not matter (if you were using 4.0 you would have to use 32bit for now since it doesn't seem to have the 64bit ready).

But since you are running ODTwithODAC112012 you are running the latest and greatest ODP (locally) so you should be set for a 32 bit run. Just make sure it installed on the server and you should be set. if it is installed, what errors are you receiving?

here are some forum help on the oracle site: Thread: Intermediate Language version of oracle.dataaccess.dll & How do I determine if my web server is correctly configured for ODP.Net?

Verify that ODP is installed (%ora_home%\11.2.0\client_1\odp.net).

9
  • Thanks; Yes, ODP.NET is installed on the server (I think it is included in 11g itself - wondows version). The threads you have mentioned gives a "The specified thread [0] was not found." on oracle site. Dec 7, 2010 at 13:38
  • You can remove the last charcter from your links to make them work. Dec 7, 2010 at 13:39
  • @Kaveh Shahbazian, I cannot say one way or another (I tend to utilize Window's web servers hitting Unix Oracle box back ends) but if you can verify that ODP is, indeed, installed that would be great, also what error are you receiving?
    – Harrison
    Dec 7, 2010 at 13:48
  • If I use Oracle.DataAccess and compile as x64 or AnyCPU I get [Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.2, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.] and if I use System.Data.OracleClient and compile as x64 or AnyCPU I get [Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.] Dec 7, 2010 at 13:53
  • @Kaveh Shahbazian, do you need to run this as a 64bit application? why don't you install ODTwithODAC112012 onto the server and run as 32 bit? also, check the GAC (c:\windows\Assembly) for Oracle.DataAccess and see what version/proc is there
    – Harrison
    Dec 7, 2010 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.