title: Single and double quotes in Sql Server 2005 insert query
body: <p>There is single and double quotes in the address textbox .How can I insert into database. I am using SQL2005.
  My code is as follows...</p>
  
  <pre><code>str = "exec sp_cust_reg '" + customer.Cust_Id + "','" + customer.Cust_Name + "','" + customer.Gender + "','" + customer.Acc_no + "','" + customer.Address + "','" + customer.Pin_no + "','" + customer.Phone_no + "','" + customer.Mobile_no + "','" + customer.Email + "','" + customer.Authorise + "'";
  </code></pre>
  
  <p>Address is jo"hn's house</p>
  
  <p>Its Text Visualizer is as follows...</p>
  
  <pre><code>exec sp_cust_reg 'C7','George Joseph','Male','0001-212123','jo"hn's house','515151','04862787896','8888888888','johnyqw@gmail.com','N'
  </code></pre>
  
  <p>I used  </p>
  
  <pre><code>string sql = str.Replace("\'", " ");.
  </code></pre>
  
  <p>Then I get </p>
  
  <pre><code>exec sp_cust_reg  C7 , George Joseph , Male , 0001-212123 , jo"hn s house , 515151 , 04862787896 , 8888888888 , johnyqw@gmail.com , N 
  </code></pre>