title: Adding a column to a datatable and adding data
body: <p>How can I add a column to a datatable and add data to each row based on a condition.
  This is what I am trying to do</p>
  
  <pre><code>conn = new OleDbConnection(@"Provider=Microsoft.Jet.OleDb.4.0;
                                  Data Source =" + Server.MapPath("App_Data\\LR Product Database 2000.mdb"));
          conn.Open();
  
          Dictionary&lt;string, string&gt; items = new Dictionary&lt;string, string&gt;();
          OleDbCommand cmd = conn.CreateCommand();
          cmd.CommandText = "SELECT CODE, TITLE FROM tblProducts";
  
          OleDbDataReader dbread = cmd.ExecuteReader();
  
          while (dbread.Read())
          {
              productCode = (string)dbread["ProductCode"];
              productTitle = items[productCode];
              items.Add(productCode, productTitle);
          }
  
          sqlCon = new SqlConnection(ConfigurationManager.ConnectionStrings["LRVWebsite"].ToString());
          sqlCon.Open();
          dsSql = new DataSet();
          SqlDataAdapter dba = new SqlDataAdapter(@"SELECT C.CustomerFirstName,C.CustomerLastName, C.CustomerCompany,C.CustomerPosition,C.CustomerCountry,C.CustomerProvince,C.CustomerContact,CP.ActionDate,CP.ProductCode,CP.CustomerEmail FROM tblCustomers C INNER JOIN tblCustomerProducts CP ON C.CustomerEmail = CP.CustomerEmail ORDER BY ActionDate DESC", connString);
          dba.Fill(dsSql,"Products");
          DataTable dt = dsSql.Tables["Products"];
  
          foreach (DataRow dr in dt.Rows)
          {
              for (int i = 0; i &lt; items.Count; i++)
              {
                  if (dr["ProductCode"].ToString().Equals(productCode))
                  {
                      //here I want to add a new column and add data (productTitle) to the column
  
  
                  }
              }
  
          }
  </code></pre>