using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Oracle.DataAccess.Client;  
  
namespace Oracle1  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            string connstring = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.37)(PORT=1521))" +"(CONNECT_DATA=(SID=orcl)));User Id=system;Password=ikmbikmb;";  
  
            using (OracleConnection conn = new OracleConnection(connstring))  
            {  
  
                conn.Open();  
  
                string sql = "select * from t1 t";  
  
                using (OracleCommand comm = new OracleCommand(sql, conn))  
                {  
  
                    using (OracleDataReader rdr = comm.ExecuteReader())  
                    {  
  
                        while (rdr.Read())  
                        {  
                            Response.Write(rdr.GetString(1) + "<br>");  
  
                        }  
  
                    }  
  
                }  
  
            }   
  
        }  
    }  
}  