3
SqlConnection cn = new SqlConnection("server=localhost;initial catalog=newmits;trusted_connection=true");
cn.Open();
string a = string.Format("select * from upnotice where show like '{0}' ,%t");
SqlDataAdapter adp1 = new SqlDataAdapter(a, cn);
DataSet ds1 = new DataSet();
adp1.Fill(ds1);
GridView1.DataSource = ds1;
GridView1.DataBind();
当我尝试没有where条件它的工作原理,但与它不工作请帮助我错误:索引(从零开始)必须大于或等于零且小于参数列表的大小