首先,'Table'是关键字其次不可以使用单引号,TableMapping["YouTableName"]
另外,你要把改动的部分回写还需要把你的具体内容贴出来才可以帮你

解决方案 »

  1.   

    SqlConnection con = new SqlConnection("server=xss;initial catalog=lxy;user Id=sa;password=1");
    string strSQL="SELECT * FROM result";
    SqlDataAdapter da=new SqlDataAdapter(strSQL,con);

    SqlCommandBuilder MyCB = new SqlCommandBuilder(da);
    DataSet ds1 = new DataSet();
    da.Fill(ds1,"result");

    StreamReader objStreamReader=new StreamReader("c:\\apriori\\data.rules");
    string Line="";
    char[] cha={' '};
    int j;

    while(objStreamReader.Peek()!=-1)
    {
    Line=objStreamReader.ReadLine();//读取一行数据
    string[] Values=Line.ToString().Split(cha); //根据空格分成数组

    DataRow r=ds1.Tables[0].NewRow();
    for(j=0;j<Values.Length;j++)
    {
    Response.Write(Values[j]);
    }
    for(j=0;j<Values.Length;j++)
    { //ds.Tables[tablename].Rows[i][j]=Values[j];//将数组值赋给字段

    r[j+1]=Values[j]; }
    ds1.Tables[0].Rows.Add(r);
    }
    da.Update(ds1);
    }
      

  2.   

    你是对同一个表"result"操作吗
    是就改为:
    DataRow r=ds1.Tables["result"].NewRow();
      

  3.   

    还是:Update 无法找到 TableMapping['Table'] 或 DataTable“Table”。