0

I try to connect my app to an Oracle database with Oracle.DataAccess.dll but i have a message => "The provider is not compatible with the version of Oracle client".

try
{
    var str = new OracleConnectionStringBuilder()
    {
        DataSource = "MyDatabase",
        UserID = "system",
        Password = "manager",
        Pooling = false,
    };
}
catch (Exception ex)
{
   //The provider is not compatible with the version of Oracle client
}

Firstly, i can connect with Oracle.ManagedDataAccess.dll but i need to use BulkCopy so i need to use Oracle.DataAccess.dll with Oracle Client.

I have install Oracle client 12.2 and i can connect to Oracle Database 10g Express Edition Release 10.2 with SQLPlus

I do not understand where this error came from. Could you help me ?

Thanks for yous answers

Maverick
  • 55
  • 1
  • 6
  • The oracle client on your machine are 32 or 64 bits architecture? And what about your .NET app, are you running in 32 or 64 bits? – lmcarreiro Oct 02 '18 at 16:33
  • There could be several reasons, see https://stackoverflow.com/questions/659341/the-provider-is-not-compatible-with-the-version-of-oracle-client#25412992 – Wernfried Domscheit Oct 02 '18 at 21:06

2 Answers2

0

you need to use a matching version of ODAC to connect to Oracle from Dotnet application

https://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

Shiju
  • 438
  • 2
  • 7
  • Thanks for your answer, I had install ODTwithODAC122011, Add the path of OracleHome to my environment variables "PATH" and "ORACLE_HOME" OracleHome is install on D: disk, it could be the mistake ? – Maverick Oct 03 '18 at 07:20
  • @Maverick try to add `OracleHome` and `OracleHome\bin` to your `PATH` environment variable. – Wernfried Domscheit Oct 03 '18 at 08:38
0

Thanks to Wernfried Domscheit of his answers ! => The provider is not compatible with the version of Oracle client

Problem come from version of Oracle.DataAccess.dll and ODAC install on the machine.

And OracleHome and OracleHome\bin to your PATH environment variable.

Maverick
  • 55
  • 1
  • 6