title: SQL Server Strings Padded with Whitespace on Insert - why?
body: <p>when i tried to insert some data into the SQL Server there was these extra characters</p>
  
  <p>for example my <code>textBox1.text == "SAMPLE"</code><br>
  then this was the code</p>
  
  <pre><code>string qry = "insert into FinalImages (FinalImageName, Date) values(@FinalImageName, @Date)";
  
  SqlConnection c = new SqlConnection(c_string);
  //Initialize SqlCommand object for insert
  SqlCommand SqlCom = new SqlCommand(qry, c);
  
  SqlCom.Parameters.Add(new SqlParameter("@FinalImageName", SqlDbType.Char, 40)).Value = textBox1.Text;
  SqlCom.Parameters.Add(new SqlParameter("@Date", SqlDbType.Char, 40)).Value = DateTime.Now.ToString("MM/dd/yyyy");
  </code></pre>
  
  <p>but when i check in the tables the record was this <code>"SAMPLE                             "</code>, it has <em>34</em> space characters added<br>
  what should be wrong?</p>