con.Open(); SqlCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "select * from Sawdusts where dateno between('" + dateTimePicker1.Value + "' AND '" + dateTimePicker2.Value + "')"; // cmd.ExecuteNonQuery(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); dataGridView2.DataSource = ds.Tables[0]; con.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)