Error while taking SUM() of column in datatable
<pre><code>DataTable dtStock = new DataTable();
DataColumn dcTotalCases = new DataColumn("TotalCases");
dcTotalCases.DataType = System.Type.GetType("System.Int32");
dcTotalCases.ReadOnly = false;
dtStock.Columns.Add(dcTotalCases);
</code></pre>

<p>Method 1</p>

<pre><code>int sum = Convert.ToInt32(dtStock.Compute("Sum([TotalCases]) ", "[TotalCases] &lt;&gt; ''"));
</code></pre>

<p>When I use this method, I get an error </p>

<blockquote>
  <p>Invalid usage of aggregate function Sum() and Type: String.</p>
</blockquote>

<p>Method 2</p>

<pre><code>int sum = Convert.ToInt32(dtStock.Compute("SUM(Convert([TotalCases], 'System.Int32'))", "");
</code></pre>

<p>When I use this method, I get an error </p>

<blockquote>
  <p>Syntax error in aggregate argument: Expecting a single column argument
  with possible 'Child' qualifier.</p>
</blockquote>

<p>Please help me...</p>
