dataGridView1.Rows.Clear(); con.Open(); SqlCommand cmd = new SqlCommand("select * from enquery where sname='" + textBox1.Text + "' or contectno='" + textBox1.Text + "' or courese='" + textBox1.Text + "'or remark='" + textBox1.Text + "' or edate='" + textBox1.Text + "' or id='" + textBox1.Text + "' or fudate='" + textBox1.Text + "' or fustatus='" + textBox1.Text + "' or cancel='" + textBox1.Text + "' ", con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { object[] row = { dr[0], dr[1], dr[2], dr[3], dr[4], dr[5], dr[6], dr[7], dr[8] }; dataGridView1.Rows.Add(row); } con.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)