title: The conversion of the varchar value overflowed an int column ASP.NET
body: <p>I have a <code>SqlDataSource</code> in ASP.NET that is returning an error</p>
  
  <blockquote>
    <p>unhandled System.Data.SqlClient.SQLException, The conversion of the varchar value '5157964168' overflowed an int column</p>
  </blockquote>
  
  <p>I am not sure why it is complaining about an int column as nothing in my code is an int column. What should I look for?</p>
  
  <pre><code>protected void SqlDataSourceA_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
  {
   e.Command.Parameters["@ID"].Value = DropDownListID.SelectedValue;
  }
  
  protected void Page_Load(object sender, EventArgs e)
  {
    SqlDataSourceA.SelectCommand = "SELECT ID, FolderName FROM DR_Folders where parentID=CONVERT(BIGINT,@ID) AND parentID!=0 order by FolderName ASC";
  }
  
  &lt;asp:SqlDataSource ID="SqlDataSourceA" runat="server" 
      ConnectionString="&lt;%$ ConnectionStrings:AConnectionString %&gt;" 
  
          SelectCommand=""&gt;
          &lt;SelectParameters&gt;
            &lt;asp:Parameter Name="ID" DbType="String" /&gt;           
          &lt;/SelectParameters&gt;
  &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>Stepping through I see 5157964168 in <code>DropDownListID.SelectedValue</code>.  I don't understand why it doesn't go into <code>@ID</code> and execute properly.  Isn't <code>@ID</code> a string?</p>
  
  <p>I've also tried <code>Type="String"</code> instead of <code>DbType</code> because I'm not sure of the difference.</p>