Pleae can anyone show me how i can connect , and retrieve and disply data from an oracle database using c#
Thanks
Chinedu Nwankwo
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dhanunjay JajimogglaPosted Oct 24, 2014, 7:57 AM
string ConString = "Data Source=XE;User Id=system;Password=*****;";
using (OracleConnection con = new OracleConnection(ConString))
{
OracleCommand cmd = new OracleCommand("SELECT * FROM HR.Employees", con);
OracleDataAdapter oda = new OracleDataAdapter(cmd);
DataSet ds = new DataSet();
oda.Fill(ds);
if (ds.Tables.Count > 0)
{
dataGridView1.DataSource = ds.Tables[0].DefaultView;
}
}
chinedu NwankwoPosted Oct 24, 2014, 12:27 PM
' Please how do i achieve this ?
Thanks Much appreciated
Chinedu Nwankwo