locked
Unable to connect to Oracle RRS feed

  • Question

  • Hello all. I've searched many web pages for methods to connect oracle database. I downloaded ODP.NET_Managed_ODAC122cR1.zip and ODAC120010Xcopy_X64 from http://www.oracle.com/technetwork/topics/dotnet/index-085163.html. I'am using Oracle 9. It's set by a software company. I cannot change any of its settings.

    Problem with the formar : It always replied with ORA-01017 invalid username/password error. I am sure the user name and the password are correct. Some web pages suggested adding a pair of " between the password. I tried that and it didn't work.I walked to the server machine and opened oralcle management studio and typed the user name and password. I could logon successfullly. Some said ODP.NET_Managed_ODAC122cR1.zip has bug in it. But older versions are unavailable.

    Problem with the latter : I installed it. I add a reference to ORacle.DataAccess.dll. When my program ran it complained that the dll could not be loaded.

    Could anyone please provide me a sure way to connect to oracle from Visual studio 2015 using C# ?

    • Moved by CoolDadTx Wednesday, August 30, 2017 1:59 PM Third party product
    Wednesday, August 30, 2017 1:22 AM

Answers

  • SO you have to install oracle 32 bit and 64 bit both version

    Visual studio uses 32 bit drivers even on 64 bit machine.

    You can check your connection in sql plus also 

    If Sql plus connects that means your credentials are good

    Regarding odp.net 

     you need to fix tns names.ora as it reads tnsname

    check various forms of connection string in .net
    again check 32 bit and 64 bit tnsnames.ora both

    https://docs.oracle.com/cd/B28359_01/win.111/b28375/featConnecting.htm

    • Marked as answer by AlanChong Friday, September 1, 2017 3:33 AM
    Wednesday, August 30, 2017 6:08 PM

All replies