using System; using System.Data.OracleClient; class Class1 { static void Main(string[] args) { String connString = "User Id=oranetuser;Password=demo"; OracleConnection oraConn = new OracleConnection(connString); try { oraConn.Open(); Console.WriteLine(oraConn.ConnectionString.ToString() + "\n"); Console.WriteLine(oraConn.State.ToString() + "\n"); Console.WriteLine(oraConn.ServerVersion.ToString()); } catch (Exception ex) { Console.WriteLine("Error occured: " + ex.Message); } finally { if (oraConn.State == System.Data.ConnectionState.Open) { oraConn.Close(); } } } }