I have tried several methods in converting my string data to an int. I am
getting a message back 'Input string was not in a correct format'
strSQL1 = "SELECT [service-cost] FROM [task] WHERE [service-order-number] =
" + Convert.ToInt32(txtSON.Text);
cmSQL1 = new SqlCommand(strSQL1,cnKennel);
if (cnKennel.State != ConnectionState.Open)
cnKennel.Open();
drSQL1 = cmSQL1.ExecuteReader();
if(drSQL1.Read())
{
lcost = drSQL1["service-cost"].ToString();
}
cnKennel.Close();
cost1 = int.Parse(lcost);
where cost1 is defined as a int, and lcost is a string. the data in lcost =
"35.00".
How do I fix this problem, I need help??
--
Norm Bohana