SqlConnection cn = new SqlConnection("server=localhost;initial catalog=newmits;trusted_connection=true");
cn.Open();
string q = string.Format("SELECT * from upnotice WHERE notice_type LIKE '{0}%'",t);
SqlDataAdapter adp = new SqlDataAdapter(q,cn);
DataSet ds = new DataSet();
adp.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
错误来自这些行请帮助我
答案 0 :(得分:0)
试试这个:
string q = "SELECT * from upnotice WHERE notice_type like '%Tender%' OR notice_type like '%RecruitementNotice%'";