none
Oracle.DataAccess.Client - DbProviderFactories.GetFactory RRS feed

  • Question

  • hello

    Trying to switch my project over from "System.Data.OracleClient" to ODP.NET "Oracle.DataAccess.Client". It failed from get go (see this article from Oracle http://www.oracle.com/technology/oramag/oracle/06-winsupp/win06odp.html):
    Code:
    DbProviderFactory oDbFactory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
    Keep getting System.Configuration.ConfigurationErrorsException saying:
    "Failed to find or load the registered .Net Framework Data Provider."

    In my futile attempt to resolve this:
    STEP 1: In machine.config

    * Under \\configuration\configSections\, add:
    <section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data,  Version=2.0.0.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

    * Under ..\system.data\DbProviderFactories\, add:
    <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description=".Net Framework Data Provider for Oracle" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342" />

    STEP 2: I checked my assembly cache it's there:
    Code:
    D:\Program Files\Microsoft Visual Studio 9.0\VC&gt;gacutil /l | findstr Oracle
    System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77
    a5c561934e089, processorArchitecture=x86
    CoreLab.Oracle, Version=3.50.12.0, Culture=neutral, PublicKeyToken=09af7300eec
    23701, processorArchitecture=MSIL
    Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f
    429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=de, PublicKeyToken=89
    b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=es, PublicKeyToken=89
    b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=fr, PublicKeyToken=89
    b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=it, PublicKeyToken=89
    b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=ja, PublicKeyToken=89
    b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=ko, PublicKeyToken=89
    b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=pt-BR, PublicKeyToken
    =89b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=zh-CHS, PublicKeyToke
    n=89b483f429c47342
    Oracle.DataAccess.resources, Version=10.2.0.100, Culture=zh-CHT, PublicKeyToke
    n=89b483f429c47342
    Policy.9.2.Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyTo
    ken=89b483f429c47342
    See, I'm sure the assembly has been installed and in machine.config I used the right key/version. Weird thing is, Red Gate's reflector won't allow me to "Open" (from Cache) the dll, this prevented me to check if there exists "Oracle.DataAccess.Client.OracleClientFactory" within the assembly. So I select "Copy Local" and examined the dll from "Red Gates Reflector". There's no "Oracle.DataAccess.Client.OracleClientFactory" in the dll ???

    RedGates Reflector - Screencap:
    http://www.codeguru.com/forum/showthread.php?p=1831221#post1831221

    Reflector can be downloaded here: http://www.red-gate.com/products/reflector/

    STEP 3. Somebody advised to check and make sure "msvcr71.dll" is found under "ORACLE_HOME\bin" and if not copy from "D:\WINDOWS\system32". I did, it's ALREADY there.

    What can I do? Confused.

    REF:
    http://www.oracle.com/technology/ora.../win06odp.html
    http://social.msdn.microsoft.com/For...7-92c63ac82144
    http://forums.oracle.com/forums/thre...89702&#2389702
    Thursday, April 9, 2009 6:30 AM

Answers

  • Hi Devvy

    I don't see Oracle.DataAccess.dll installed in your assembly cache. Did the install for ODP.NET completed successfully? If it didn't that could be a reason why it is not working. Also, I would suggesting posting the question on forum for ODP.NET as they may have better information http://forums.oracle.com/forums/forum.jspa?forumID=146

    Thanks
    Himanshu
    Please remember to mark the replies as answers if they help you.
    Monday, April 13, 2009 6:21 AM

All replies

  • Hi Devvy

    I don't see Oracle.DataAccess.dll installed in your assembly cache. Did the install for ODP.NET completed successfully? If it didn't that could be a reason why it is not working. Also, I would suggesting posting the question on forum for ODP.NET as they may have better information http://forums.oracle.com/forums/forum.jspa?forumID=146

    Thanks
    Himanshu
    Please remember to mark the replies as answers if they help you.
    Monday, April 13, 2009 6:21 AM
  • Thanks it's been resolved, the latest prod version actually has support for factory classes - i was using old version
    Monday, April 13, 2009 6:22 AM