Failed to convert parameter value from a String to a Double C#
<p>I Have a Datalist that is populated by a table and when I try to update the table from the Datalist I get the Exception: "Failed to convert parameter value from a String to a Double"</p>

<p>here is the click of the update button:</p>

<pre><code>for (int x = 0; x &lt; dlQtyBreak.Items.Count; x++)
{
    DataListItem item = dlQtyBreak.Items[x];

    string linenum = ((Label)item.FindControl("lblPBLinenum")).Text;
    string lowqty = ((TextBox)item.FindControl("txtPBLowQty")).Text;
    string highqty = ((TextBox)item.FindControl("txtPBHighQty")).Text;
    string price = ((TextBox)item.FindControl("txtPBPrice")).Text;
    string salesprice = ((TextBox)item.FindControl("txtPBSalesPrice")).Text;
    DAL.Util.updatePriceBreakRow(IQPDID(), lowqty, highqty, price, salesprice, linenum);

}
</code></pre>

<p>and this next code is the sql and the parameters</p>

<pre><code>public static void updatePriceBreakRow(string IQPDID, string low, string high, string price, string sPrice, string linenum)
{
    string sql = "UPDATE ItemQtyPriceDiscTable SET  LowQuantity=@LowQty, HighQuantity=@HighQty, Price=@Price WHERE linenum=@lineNum";

    AdoUtil.ACESSQLParameterCollection parameters = new AdoUtil.ACESSQLParameterCollection();
    AdoUtil.ACESSQLParameter param = new AdoUtil.ACESSQLParameter();

    param.ParamName = "@IQPDID";
    param.ParamValue = IQPDID;
    param.ParamDBType = SqlDbType.Int;
    parameters.Add(param);

    param.ParamName = "@LowQty";
    param.ParamValue = low;
    param.ParamDBType = SqlDbType.Float;
    parameters.Add(param);

    param.ParamName = "@HighQty";
    param.ParamValue = high;
    param.ParamDBType = SqlDbType.Float;
    parameters.Add(param);

    param.ParamName = "@Price";
    param.ParamValue = price;
    param.ParamDBType = SqlDbType.Float;
    parameters.Add(param);

    param.ParamName = "@SalePrice";
    param.ParamValue = sPrice;
    param.ParamDBType = SqlDbType.Float;
    parameters.Add(param);

    param.ParamName = "@linenum";
    param.ParamValue = linenum;
    param.ParamDBType = SqlDbType.Int;
    parameters.Add(param);

    param.ParamName = "@update";
    param.ParamValue = lastUpdate;
    param.ParamDBType = SqlDbType.VarChar;
    parameters.Add(param);

    AdoUtil.ExecuteNonQuery(sql, parameters);
}
</code></pre>

<p>What can be causing this? When I do the same process on another datalist it works, only difference is that table uses all Int and varchar values where this one uses Float and varchar. If anyone has any helpful insight to help solve this problem it will be greatly appreciated. And if there is any other code that could be useful just ask and I can post it.</p>

<p>Thank you.</p>
