using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Oracle.DataAccess.Client;
using System.Data;
using ConsoleApplication2.Properties;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string oradb = Settings.Default.ConnectionString; // "user id=hr;password=hr; data source=svrname";

            using (OracleConnection conn = new OracleConnection(oradb))
            {
                conn.Open();
                OracleCommand cmd = new OracleCommand();
                cmd.Connection = conn;
                cmd.CommandText = "select department_name from departments";
                cmd.CommandType = CommandType.Text;

                using (OracleDataReader dr = cmd.ExecuteReader())
                {
                    dr.Read();
                    string txt = dr.GetString(0);
                    Console.WriteLine(txt);
                }
            }
        }
    }
}
