Q:

can any one help me how to connect database in oracle and the connection string in c#

  protected void Page_Load(object sender, EventArgs e)
    {

        OracleConnection con = new OracleConnection();
        con. ConnectionString = "User id =test;password=test1;Datasource=oracle";
       myConnection. Open();

    }

Above is the code that I am using.  It will be called on page_Load. 

A:

        string oradb = "User id =test;password=test1;Datasource=oracle";
        OracleConnection conn = new OracleConnection(oradb);  
        conn. Open();
        using (OracleDataAdapter  a = new OracleDataAdapter(
                "SELECT id FROM emp1", conn))
            {
                DataTable t = new DataTable();
                a.Fill(t);
                // Render data onto the screen
                dataGridView1.DataSource = t;
            }

        conn. Dispose();

