title: Failed to convert parameter value from a String to a Decimal
body: <p>Im importing a csv to my sql server table using the following code</p>
  
  <pre><code>SqlCommand nonqueryCommand = myConnection.CreateCommand();
  nonqueryCommand.CommandText = 
                   "INSERT INTO MYTABLE VALUES(@num1, @num2,@num3,@num4)";
  
  nonqueryCommand.Parameters.Add("@num1",SqlDbType.Decimal);
  nonqueryCommand.Parameters.Add("@num2", SqlDbType.Decimal);
  nonqueryCommand.Parameters.Add("@num3", SqlDbType.Decimal);
  nonqueryCommand.Parameters.Add("@num4", SqlDbType.Decimal);
  
  nonqueryCommand.Parameters["@num1"].Value = crntRecord[0];
  nonqueryCommand.Parameters["@num2"].Value = crntRecord[1];
  nonqueryCommand.Parameters["@num3"].Value =crntRecord[3];
  nonqueryCommand.Parameters["@num4"].Value = crntRecord[4];
  
  nonqueryCommand.ExecuteNonQuery();
  </code></pre>
  
  <p>where the parameter 3 and 4 are of type decimal(9,6) in the DDL when i execute the code at <code>ExecuteNonQuery</code> i get the following exception</p>
  
  <blockquote>
    <p>Failed to convert parameter value from a String to a Decimal.</p>
  </blockquote>
  
  <p>please help me find out the problem tnx.</p>
  
  <p>EDIT</p>
  
  <p>the value in the crntRecord[3] looks like </p>
  
  <p><img src="https://i.stack.imgur.com/DfsTJ.png" alt="enter image description here"></p>