OleDbDataAdapter 填充多个表与DataList绑定的问题?
本帖最后由 ekin0559 于 2013-01-16 21:01:38 编辑 错误提示:该特定字段 '[cid]' 可以参考 SQL 语句中 FROM 子句列表中的多个表。
string selstr = "select * from [list],[type] where [cid]=" + type + "and [list.cid]=[type.cid] order by [seller_credit] desc";
OleDbDataAdapter ada = new OleDbDataAdapter(selstr, constring);
DataSet ds = new DataSet();
ada.Fill(ds, 0, count, "list");
ada.Fill(ds);
DataList1.DataSource = ds.Tables["list"];
DataList1.DataBind();
[解决办法]
cid在多个表忠都有,你要加上表名