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 code using. called on page_load.

        string oradb = "user id =test;password=test1;datasource=oracle";         oracleconnection conn = new oracleconnection(oradb);           conn.open();         using (oracledataadapter  = new oracledataadapter(                 "select id emp1", conn))             {                 datatable t = new datatable();                 a.fill(t);                 // render data onto screen                 datagridview1.datasource = t;             }          conn.dispose(); 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -