Answered by:
Unable to connect to Oracle

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 bothhttps://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
-
You should use Bing or Google and seek out an Oracle forum for help.Wednesday, August 30, 2017 1:37 AM
-
Hi AlanChong,
Based on your description and related error message, I research the follow similar issue for your reference.
https://docs.oracle.com/cd/E18283_01/appdev.112/e10767/connecting.htm
In addition, since odp.net is a 3rd-party. I would suggest that you could post your issue 3rd-party forum for suitable support.
https://community.oracle.com/community/database/developer-tools/windows_and_.net/odp.net
Thanks for your understanding.
Best regards,
Cole
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Wednesday, August 30, 2017 6:08 AM -
Hello. Thank you for the links. I've looked at more than 50 web pages about the issue.
I think it's just driver problem. I have a Delphi program that connects oracle. It works fine for six years. My boss wanted me to rewrite it using c#. I provided the same ConnectionString as I do with Delphi. The same ConnectionString wiorks with Delphi but doesn't work with newer Oracle 64 bit driver for C# program.
I'll go to the links you provided when I have time.
Wednesday, August 30, 2017 7:48 AM -
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 bothhttps://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 -
Thanks. I'll try thatFriday, September 1, 2017 3:33 AM