// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Data.OracleClient; namespace E { class MainClass { public static void Main(string[] args) { OracleConnection con = new OracleConnection("Server=ARNEPC3;User ID=xxxx;Password=xxxx"); con.Open(); OracleCommand cmd = new OracleCommand("SELECT * FROM T1", con); OracleDataReader rdr = cmd.ExecuteReader(); while(rdr.Read()) { decimal f1 = (decimal)rdr[0]; string f2 = (string)rdr[1]; Console.WriteLine(f1 + " " + f2); } rdr.Close(); con.Close(); } } }