title: Specified cast is not valid in linq query
body: <p>Is there some way rather than try and error to specify which field makes the problem and what's the correct field type ?</p>
  
  <p>I get the following exception :</p>
  
  <blockquote>
    <p>Specified cast is not valid.</p>
  </blockquote>
  
  <pre><code> var vacStatiscs = from x in dtGivenBal.AsEnumerable()
                                    join y in dtTakenBal.AsEnumerable()
                                    on x["emp_num"].ToString() equals y["emp_num"].ToString()
                                    into joined
                                    from j in joined.DefaultIfEmpty()
                                    select new
                                    {
                                        emp_num = x.Field&lt;int&gt;("emp_num"),
                                        name = x.Field&lt;string&gt;("name"),
                                        startBal = x.Field&lt;int&gt;("startBal"),
                                        prevMon = x.Field&lt;int&gt;("PrevMon"),
                                        added = x.Field&lt;int&gt;("Added"),
                                        taken = (j == null) ? 0 : j.Field&lt;Int32&gt;("sum")
  
                                    };
  </code></pre>
  
  <hr>
  
  <p>Now if I remove <code>startBal ,prevMon ,added</code>, I get no exceptions.</p>
  
  <p><strong>Note:</strong> the previous fields are result of <code>COUNT</code> and <code>SUM</code> SQL queries</p>