1
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();

错误出现在这些行请帮助我

4

1 回答 1

0

尝试这个:

string q = "SELECT * from upnotice WHERE notice_type like '%Tender%' OR notice_type like '%RecruitementNotice%'";
于 2013-09-07T08:14:09.320 回答