Last post Dec 20, 2010 11:49 AM by Lannie
Dec 19, 2010 04:29 PM|PDTUM|LINK
I have a Windows 7 dev machine used to create .Net applications with VS 2010. I want to connect to a remote server (on the same network running Windows 2003 Server) that is running an Oracle 10g database. I also need to mention (just in case) that the
remote server is also hosting an MS SQL 2005 application as well. I am using the code below (with the first connection string) to connect directly to a version of 10g that is running on the same machine with no problems, however when I try to connect to the
network machine, it actually crashes Windows 7. What concerns me is that I have dual try/catch statements in the application and I do not understand why it simply does not refuse the connection and report the error. I have tried several variations of connection
strings as I feel that I must be making a sytax error somewhere. I suppose the real question is 'what is the correct syntax for the connection string'....or WHATEVER the hell I am doing wrong. This is my first go around with Oracle (and I am not liking it
at all), but it is not a matter of choice for me. SO.........any help or suggestions are greatly appreciated. Thank you in advance...Best Regards, Pat
Dec 19, 2010 08:22 PM|N Rajesh|LINK
In the connection string you need to use Data source instead of Server.
string CONNSTR = "Data Source=192.168.2.5;User Id=Patt;Password=Mine;";
Dec 20, 2010 11:49 AM|Lannie|LINK
And after using the correct IP address instead of local host 127.0.0.1,
you may also encounter firewall issues with PORT 1521 Oracle Listener,
depending on firewall setting in Windows 2003 and any firewalls between application and database.