locked
Unable to connect to Oracle database from Oracle.DataAccess.dll RRS feed

  • Question

  • My laptop has a visual studios 2012 professional and Oracle 12c database installed. From my C# I am connecting to a database. I have the files oci.dll, ociw32.dll, Oracle.DataAccess.dll, orannzsbb12.dll, oraocci12.dll, oraociicus12.dll, OraOps12.dll in my bin of my project that I acquired from ODAC 12c Release 3 (12.1.0.2.1). When I run the application I am getting the following error. The type initializer for 'Oracle.DataAccess.Client.OracleDataAdapter' threw an exception. The provider is not compatible with the version of Oracle client. However when I utilize Oracle.ManageDataAcess instead of Oracle.DataAccess I end with the error {"ORA-12154: TNS:could not resolve the connect identifier specified"}. When I bring all the files oci.dll, ociw32.dll, Oracle.DataAccess.dll, orannzsbb12.dll, oraocci12.dll, oraociicus12.dll, OraOps12.dll from my Oracle 12c database home directory instead of from the oracle client zipfile I am ending up with “Server Error in '/' Application. Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.”

    I would appreciate you help in taking care of the issue for me.

    • Moved by Tina-Shi Tuesday, August 4, 2015 1:47 AM related to the oracle
    Tuesday, July 28, 2015 2:42 AM

All replies

  • Hi,

    Thank you for posting in MSDN forum.

    Since this forum is discuss VS Unit test, so I think that the issue is out of support range of this forum.

    However, from your description, I think that it is more related to the Oracle database. I did some research about this Oracle database, I know that the Oracle database is a third-party database, so we are not support it.

    So to better help you support this issue, I suggest you could ask this issue directly to the Oracle forum:

    https://community.oracle.com/community/technology_network_community for better respond.

    Thanks for your understanding!

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 29, 2015 7:48 AM