hi guys, i need to connect to oracle database with c# application trough tunnel,
with the tunnel, in the connection string i need to connect to localhost:9090, but whatever i try to connect the application is trowing error at connection.Open(); function.
usings:
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
ERROR:
An unhandled exception of type 'Oracle.DataAccess.Client.OracleException' occurred in Oracle.DataAccess.dll
Additional information: External component has thrown an exception.
the code is:
string DBC = "User Id=SCHEMANAMEHERE;Password=PASSHERE;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=9090))(CONNECT_DATA=(SID=orcl)));";
Oracle.DataAccess.Client.OracleConnection conn = new Oracle.DataAccess.Client.OracleConnection(DBC);
Oracle.DataAccess.Client.OracleCommand cmd = new Oracle.DataAccess.Client.OracleCommand();
try
{
conn.Open();
}
catch (OracleTypeException ex) { System.Windows.Forms.MessageBox.Show("ERROR: " + ex.Message); }
cmd = new Oracle.DataAccess.Client.OracleCommand(" select * from KLIENT;", conn);
cmd.ExecuteNonQuery();
on conn.open the application is trowing unhandled exception which i cant catch with Exception, OracleExcpetion, OracleTypeException ... so what should i do?! i need this app very fast to finish but im still strugiling with this problem for about 2 days now....
thanks in advance.