i wrote below code to display in gridview as per date, but it is giving me error.
code:
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();
Jaganathan BantheswaranPosted Oct 20, 2013, 1:08 AM
durgaprasad rangulaPosted Oct 19, 2013, 2:36 PM
You should convert string (lbldatee.Text) to date format.If it is date formatted string then it should be in single quotes.
ex : 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 + "';