syed ziya

syed ziya

  • NA
  • 14
  • 10.9k

select querry to display on gridview

Oct 19 2013 1:27 PM
Hiii frnds,

     i wrote below code to display in gridview as per date, but it is giving me error.

code:


string s = "select Sno,[Flight_no],[Dept_time],[Arr_time],Route,[dest_1],dest2,dest3,dest4,load,[Actual_cap],water,juice,initial from days where date=" +lbldatee.Text ;

OleDbCommand cmd = new OleDbCommand(s, con);


using

{


adapter.Fill(ds);

dataGridView1.DataSource = ds.Tables[0];

}

(OleDbDataAdapter adapter = new OleDbDataAdapter(s, con))DataSet ds = new DataSet();

Answers (2)