title: Unable to cast object of type 'System.Data.DataRow' to type 'System.IConvertible'.Couldn't store <System.Data.DataRow> in regid Column
body: <p>I am stuck in adding dataset values into datatable with for loop. Please see the code and help me. It throws error like expected int32.</p>
  
  <pre><code>string allCtries = string.Empty;
  allCtries = com.COUNTRY_ID;
  string[] splitctrs = new string[] { };
  splitctrs = allCtries.Split(',');
  string m_Query = string.Empty;
  DataSet dsPck = new DataSet();
  DataTable dt = new DataTable();
  dt.Columns.AddRange(new DataColumn[3] { new DataColumn("regid", typeof(int)),
                                                      new DataColumn("cid", typeof(int)),
                                                      new DataColumn("pid", typeof(int)) });
  foreach (string val in splitctrs)
  {
      dsPck = con.GetDataSet("select  registrationid, country_id, product_id from registration where product_id = " + com.PRODUCT_ID + " and country_id = " + val + "", CommandType.Text, ConnectionState.Open);
      DataRowCollection drr = dsPck.Tables[0].Rows;
      foreach (var row in drr)
          dt.Rows.Add(row);
      //if (dsPck.Tables[0].Rows.Count&gt; 0)
      //{
      //    dt.Rows.Add(dsPck);
      //}
  }
  </code></pre>