|
两个 SqlDataAdapter 填充一个dataset 但是 有问题
运行的 时候说没有找到绑定的字段名称,,
string strSql="select news_info.*,user_info.* from news_info,user_info where news_info.news_id="+news_id+" and user_info.user_id="+news_id;
string strSql2="select re_news_info.*,user_info.* from re_news_info,user_info where re_news_info.re_news_id="+news_id+" and user_info.user_id="+news_id;
SqlDataAdapter ad=new SqlDataAdapter(strSql,cn);
SqlDataAdapter ad2=new SqlDataAdapter(strSql2,cn);
cn.Open();
DataSet ds=new DataSet();
ad.Fill(ds,"news_info");
ad2.Fill(ds,"user_info");
绑定语句
DataBinder.Eval(Container.DataItem,"news_name")
不知道该在那么写··· |
|