using System; using Oracle.DataAccess.Client; class Hello { static void Main( String[] args ) { string conStr = "Data Source=ORCL;" + "User Id=scott;" + "Password=tiger"; string sqlStr = "SELECT 'Hello, ODP.NET World!' AS Message FROM DUAL"; OracleConnection con = new OracleConnection(conStr); OracleCommand cmd = new OracleCommand(sqlStr, con); con.Open(); OracleDataReader reader = cmd.ExecuteReader(); while( reader.Read() ) { Console.WriteLine( reader.GetName(0) ); Console.WriteLine( "---------------------" ); Console.WriteLine( reader[0] ); } reader.Close(); con.Close(); } }