Nel

Nel

  • NA
  • 716
  • 1.1m

Converting string to decimal type-Input string was not in a correct format.

Jan 30 2012 4:41 AM
Hi,

Can anybody help me how to convert the value from the textbox into decimal type?
I have an access database and the fields I wanted to be of type currency, I changed into type decimal, fixed with 2 decimals.

I have this code in my C# application:

com.Parameters.AddWithValue("@VkiznosbezDDVDen", Convert.ToDecimal(textBox7.Text));

and I get an error: "Input string was not in a correct format."

Thanks in advance.

Answers (7)