Please help me for changing data table row value from dictionary
<p>I have a dictionary I want to read this as for that my data table row value. I'm reading dictionary and data table row value but I can't change row value that coming dictionary value.</p>

<p>The exception is:</p>

<blockquote>
  <p>Input string was not in a correct format. Couldn't store in IL Column. Expected type is Int16.</p>
</blockquote>

<p>I fill data table from database and IL column type smallint I don't want to change column type <code>nvarchar</code> or anything else. How I can solve this problem?</p>

<p>My code here:</p>

<pre><code>public DataTable getData(string komut)
{
    DataTable dt = new DataTable();
    cnn = connect.GetConnection();
    sorgu = komut;
    cmd = new SqlCommand(sorgu, cnn);
    adap = new SqlDataAdapter(cmd);
    adap.Fill(dt);

    for (int i = 0; i &lt; dt.Rows.Count; i++)
    {
        if (dt.Columns["IL"].ColumnName == "IL")
        {
            string tmpSehir;

            iller.TryGetValue(dt.Rows[i]["IL"].ToString(), out tmpSehir);

            dt.Rows[i]["IL"] = tmpSehir;
        }
    }

    return dt;
}
</code></pre>

<p>and I tried this another way but it did not work.</p>

<pre><code>string tmpSehir;

iller.TryGetValue(dt.Rows[i]["IL"].ToString(), out tmpSehir);
short tmpShort;
Int16.TryParse(tmpSehir, out tmpShort);
dt.Rows[i]["IL"] = tmpShort;
</code></pre>
