require 'mscorlib' require 'System' require 'System.Data' require 'Oracle.DataAccess' include System include System::Data include Oracle::DataAccess::Client conStr = "Data Source=ORCL;User ID=scott;Password=tiger" sqlStr = "SELECT 'Hello, ODP.NET World!' AS Message FROM DUAL" con = OracleConnection.new(conStr) cmd = OracleCommand.new(sqlStr, con) con.Open() reader = cmd.ExecuteReader() while reader.Read() do Console.WriteLine( reader.GetName(0) ) Console.WriteLine( "---------------------" ) Console.WriteLine( reader.GetValue(0) ) end reader.Close() con.Close()