SUNIL GUTTA

SUNIL GUTTA

  • NA
  • 1k
  • 395.3k

Data reader with gridview ?

Sep 18 2013 5:47 AM
Hi

i tried as below its not loading data into grid view when i tried using dataset it worked perfectly 

 OleDbCommand cmd = new OleDbCommand("select * from customer", con);
            con.Open();
            MessageBox.Show(con.State.ToString());
            OleDbDataReader dr = cmd.ExecuteReader();
      
            con.Close();
            MessageBox.Show(con.State.ToString());
            dataGridView1.DataSource = dr;


Cheers & thanks everyone 

Answers (8)