title: DataAdapter: Update unable to find TableMapping['Table'] or DataTable 'Table'
body: <p>This code snippet is throwing an error:</p>
  
  <blockquote>
    <p>Update unable to find TableMapping['Table'] or DataTable 'Table'.) on adapter.Update(ds); line</p>
  </blockquote>
  
  <p>Why it is throwing this type of error?</p>
  
  <pre><code>SqlConnection con = new SqlConnection();
  con.ConnectionString = connectionString();
  
  DataSet ds = new DataSet();
  
  string strQuery = "SELECT * FROM Cars";
  SqlDataAdapter adapter = new SqlDataAdapter();
  
  adapter.SelectCommand = new SqlCommand(strQuery, con);
  
  SqlCommandBuilder builder = new SqlCommandBuilder(adapter);
  
  adapter.Fill(ds, "Cars");
  
  //Code to modify data in the DataSet
  ds.Tables["Cars"].Rows[0]["Brand"] = "NewBrand";
  
  adapter.UpdateCommand = builder.GetUpdateCommand();
  adapter.Update(ds);
  </code></pre>