第 1 行: '=' 附近有语法错误。 错误信息:第 1 行: '=' 附近有语法错误。 说明: 执行当前 Web 请求期间,
stringStrSelect=this.WhereStr();stringConStr=ConfigurationManager.ConnectionStrings["...
string StrSelect = this.WhereStr();
string ConStr = ConfigurationManager.ConnectionStrings["CommonConStr"].ConnectionString;
SqlConnection CommonCon = new SqlConnection(ConStr);
CommonCon.Open();
String SqlSelect = "select [name],[cont],[guide] from xg and" + StrSelect.ToString ().Trim ();
SqlCommand MyCom = new SqlCommand(SqlSelect, CommonCon);
DataSet MyDs = new DataSet();
SqlDataAdapter MySda = new SqlDataAdapter(MyCom);
MySda.Fill(MyDs);
GridView2.DataSourceID = "";
GridView2.DataSource = MyDs.Tables[0];
GridView2.DataBind(); 展开
string ConStr = ConfigurationManager.ConnectionStrings["CommonConStr"].ConnectionString;
SqlConnection CommonCon = new SqlConnection(ConStr);
CommonCon.Open();
String SqlSelect = "select [name],[cont],[guide] from xg and" + StrSelect.ToString ().Trim ();
SqlCommand MyCom = new SqlCommand(SqlSelect, CommonCon);
DataSet MyDs = new DataSet();
SqlDataAdapter MySda = new SqlDataAdapter(MyCom);
MySda.Fill(MyDs);
GridView2.DataSourceID = "";
GridView2.DataSource = MyDs.Tables[0];
GridView2.DataBind(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询