simona a

simona a

  • NA
  • 5
  • 0

Error connecting to oracle database from a .net application on Windows 7

Mar 11 2012 9:43 AM

Hi,

I get this error when my .Net Windows application exe tries to connect to Oracle database on a 64-bit Windows 7 machine.Am using System.Data.OracleClient.dll as a provider.

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

Am able to connect to the same database using a "udl file" and using "SQL Plus" utility on this machine.

On my Windows 7 machine, ORACLE_HOME directory is correctly pointing to 32 bit client in the environment variable and registry too, but still am getting the same error.And am using "x86" as target platform in my VS.Net 2010 settings.Am able to connect to db on this machine using a Console application but not from an exe.

Also, am able to connect to this database from .Net app on a Windows XP machine even if does not have any of these environment variables present.

Could you please advise? 


Answers (1)