本帖最后由 ekin0559 于 2013-01-16 21:01:38 编辑

解决方案 »

  1.   

    cid在多个表忠都有,你要加上表名
      

  2.   

    如果多个表中有相同字段的话,字段前需要指定对应的表名,否则无法区分。就像一个班级里有2个同名的同学,你喊他们名字,他们都不知道到底你叫的是谁,比如说2个人来自不同地方,你可以说“上海的王小Y”string selstr = "select * from [list],[type] where list.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();