0

I am can successfully execute the following code on a particular web project on my local dev machine..

      string cStr = @"data source=xxxxxxx;user id=xxxxx;password=xxxx;persist security info=false";
      using (OracleConnection oc = new OracleConnection(cStr))
      {
          oc.Open();
          oc.Close();

      }

But if I try to execute it in any other project (web, console, Test), I get the following error.

OCIEnvCreate failed with return code -1 but error message text was not available.

I have googled and looked through this site and all the answers have not helped me so far. I really need help. So please do not down vote this question.

Here is my development machine setup...

Windows 7 Enterprise Service Pack 1 64 bit OS

Visual Studio 2010 Enterprise Service pack 1 IIS version 7.5

Oracle version 11.2.0

The working web application is targeting .net framework 4.

thanks

7
  • Try to search for differences between that working project and others, what else can be said here... Don't believe it has anything to do with your Windows or VS version. If that was the case, you would have problems with every project. You're probably doing something different. Commented Jun 12, 2012 at 0:35
  • Is your application running in 32 bit or 64 bit mode.it is possible that your first application is running in 32 bit mode and your ORACLE_HOME is pointing to 32 bit one.The rest applications might be in 64 bit mode Commented Jun 12, 2012 at 0:37
  • At my place of employment, we have major issues using anything with Oracle in 64 bit mode. Commented Jun 12, 2012 at 0:42
  • How do I tell which mode 32 bit or 64 bit version? Its targetting .net framework 4. Environment variable ORACLE_HOME is pointing to C:\Oracle\product\11.2.0\client_1\network\admin. I don't understand why does it work for particular web application and not for any thing else. Commented Jun 12, 2012 at 0:52
  • "The working web application is targeting .net framework 4." - means those not working apps are using a different version? Commented Jun 12, 2012 at 0:52

1 Answer 1

1

The problem is that there are several Oracle clients installed.

See this page of TechnoEncode

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.