Oracle.DataAccess version numbers in a .NET config file

For my future reference!

RADE and FullCircle and builds usually have the ODP.NET version in the web.confg set by the installer, but development builds usually come from my machine and are configured for use with the Oracle 11 ODP.NET.   If this is set incorrectly, you will get an error that looks a little something like this:

The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.

To use an different version of the Oracle client, the web.config must be edited and the QualifyAssembly section must have its version property set appropriately.  This will also apply for an app.config too.

1: <runtime> 2: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 3: <qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342"/> 4: </assemblyBinding> 5: </runtime>

Possible values for this are:

  • 11g: Version=
  • 10g R2: Version=
  • 10g: Version=

Set your config appropriately and you’re good to go.

Page 1 of 2 | Next page