title: How to Add Quotes to a Dynamic SQL Command?
body: <p>I am storing and editing some field in a database that involves a long string of one or more sentences. whenever i enter a single quote in the textbox and want to save it it throws an exception like 
  <em>"Incorrect syntax near 'l'.
  Unclosed quotation mark after the character string ''."</em>
  is there any idea to avoid that?</p>
  
  <p><strong>EDIT:</strong>
  The query is:</p>
  
  <pre><code>SqlCommand com = new SqlCommand("UPDATE Questions SET Question = '[" + 
      tbQuestion.Text + "]', Answer = '[" + 
      tbAnswer.Text + "]', LastEdit = '" + 
      CurrentUser.Login + 
      "'WHERE ID = '" + CurrentQuestion.ID + "'");
  </code></pre>