c# error with dataset update
<p>I have list of type string with name temp1 in this list i have a group of words for each word im calculating N00,N01,N10,N11,MI at last it is throwing exception <strong>Update unable to find TableMapping['sample'] or DataTable 'sample'.</strong>.plz help</p>

<pre><code>DataSet dsSelectAll = new DataSet();
    SqlCommand cmdSelectAll = new SqlCommand("select * from sample", con);
    SqlDataAdapter daSelectAll = new SqlDataAdapter(cmdSelectAll);
    SqlCommandBuilder scb = new SqlCommandBuilder(daSelectAll);
    daSelectAll.FillSchema(dsSelectAll,SchemaType.Mapped, "sample");

    foreach (string ri in temp1)
    {
        //for (int a3 = 0; a3 &lt; ssl.Count; a3++)
        {


                cmdT.CommandText = @"SELECT * FROM [vijay].[dbo].[sample] where keyword in ('y','" + ri + "')";
               // ds.Tables.Clear();
                da.Fill(ds);

                // row 1 ::     1   0   0   1   0   0
                // row 2::      2   7   0   0   0   1   

                int N00 = 0;
                int N01 = 0;
                int N10 = 0;
                int N11 = 0;

                for (int i = 0; i &lt; ds.Tables[0].Columns.Count; i++)
                {
                    // N00
                    if (ds.Tables[0].Rows[0][i].ToString() == "0")
                    {
                        if (ds.Tables[0].Rows[1][i].ToString() == "0")
                        {
                            N00++;
                        }
                    }

                    // N01
                    if (ds.Tables[0].Rows[0][i].ToString() == "1")
                    {
                        if (ds.Tables[0].Rows[1][i].ToString() == "0")
                        {
                            N01++;
                        }
                    }

                    // N10
                    if (ds.Tables[0].Rows[0][i].ToString() == "0")
                    {
                        if ((ds.Tables[0].Rows[1][i].ToString()) !="0")
                        {
                            N10++;
                        }
                    }

                    // N11
                    if (ds.Tables[0].Rows[0][i].ToString() == "1")
                    {
                        if (ds.Tables[0].Rows[1][i].ToString()!="0")
                        {
                            N11++;
                        }
                    }
                }

                //if (a3 == (ssl.Count - 1))
                {
                    //SqlCommand ins = new SqlCommand("update sample set N00=" + N00 + " where KeyWord='" + ri + "'", con);
                    //ins.ExecuteNonQuery();

                    DataRow[] drSelectAll = ds.Tables[0].Select("KeyWord='" + ri + "'");
                    drSelectAll[0]["N00"] = N00;
                    drSelectAll[0]["N01"] = N01;
                    drSelectAll[0]["N10"] = N10;
                    drSelectAll[0]["N11"] = N11;


                    double n = N00 + N11 + N10 + N01;
                    double w1 = Convert.ToDouble((N11 / n) * (Math.Log(((n * N11) / ((N10 + N11) * (N01 + N11))), 2)));
                    double w2 = Convert.ToDouble((N01 / n) * (Math.Log(((n * N01) / (((N01 + N00) * (N01 + N11)))), 2)));
                    double w4 = Convert.ToDouble((N00 / n) * (Math.Log(((n * N00) / (((N00 + N01) * (N00 + N10)))), 2)));
                    double w3 = Convert.ToDouble((N10 / n) * (Math.Log(((n * N10) / (((N10 + N11) * (N00 + N10)))), 2)));
                    if (w1.ToString() == "NaN")
                    {
                        w1 = 0;
                    }
                    if (w2.ToString() == "NaN")
                    {
                        w2 = 0;
                    }
                    if (w3.ToString() == "NaN")
                    {
                        w3 = 0;
                    }
                    if (w4.ToString() == "NaN")
                    {
                        w4 = 0;
                    }

                    double ni = w1 + w2 + w3 + w4;

                    drSelectAll[0]["MI"] = ni;
                    ds.Tables[0].Rows.Add(drSelectAll);
                }

        }
    }


    try
    {

        daSelectAll.Update(ds, "sample");

    }
    catch (Exception)
    {

        throw;//error
    }
</code></pre>

<p>Error:Update unable to find TableMapping['sample'] or DataTable 'sample'.</p>
