Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
258 Points
84 Posts
May 02, 2012 07:31 AM|LINK
hi,
im not sure how you are connecting to oracle ....
what i do is, in my connection string i use the entire block from tnsnames file. this way im never dependent on the oracle configuration.
all you have to do is make sure you have oracle client well installed.
here it goes
using system.data.oracleclient; oracleconnection a = new oracleconnection(); a.connectionstring = "User ID=" + /*your_oracle_user*/ + ";Password=" + /*your_oracle_password*/ + ";Data Source=" + "(DESCRIPTION = " + " (ADDRESS = (PROTOCOL = TCP)(HOST = " + /*Your_host_name_or_ipaddress*/ + ")(PORT = 1521)) " + " (CONNECT_DATA = " + " (SERVER = DEDICATED) " + " (SID = " + /*Your_Sid_NAME*/ + ") " + " ) " + ")"; a.open();
ruipedromach...
Member
258 Points
84 Posts
Re: ASP.NET oracle connection not working in debug mode
May 02, 2012 07:31 AM|LINK
hi,
im not sure how you are connecting to oracle ....
what i do is, in my connection string i use the entire block from tnsnames file. this way im never dependent on the oracle configuration.
all you have to do is make sure you have oracle client well installed.
here it goes
using system.data.oracleclient; oracleconnection a = new oracleconnection(); a.connectionstring = "User ID=" + /*your_oracle_user*/ + ";Password=" + /*your_oracle_password*/ + ";Data Source=" + "(DESCRIPTION = " + " (ADDRESS = (PROTOCOL = TCP)(HOST = " + /*Your_host_name_or_ipaddress*/ + ")(PORT = 1521)) " + " (CONNECT_DATA = " + " (SERVER = DEDICATED) " + " (SID = " + /*Your_Sid_NAME*/ + ") " + " ) " + ")"; a.open();