title: Use of SqlParameter in SQL LIKE clause not working
body: <p>I have the following code:</p>
  
  <pre><code>const string Sql = 
      @"select distinct [name] 
        from tblCustomers 
        left outer join tblCustomerInfo on tblCustomers.Id = tblCustomerInfo.CustomerId  
        where (tblCustomer.Name LIKE '%@SEARCH%' OR tblCustomerInfo.Info LIKE '%@SEARCH%');";
  
  using (var command = new SqlCommand(Sql, Connection))
  {       
      command.Parameters.AddWithValue("@SEARCH", searchString);
      ...
  }
  </code></pre>
  
  <p>This does not work, I tried this as well:</p>
  
  <pre><code>const string Sql = 
      @"select distinct [name] 
       from tblCustomers 
       left outer join tblCustomerInfo on tblCustomers.Id = tblCustomerInfo.CustomerId  
       where (tblCustomer.Name LIKE @SEARCH OR tblCustomerInfo.Info LIKE @SEARCH );";
  
  using (var command = new SqlCommand(Sql, Connection))
  {       
      command.Parameters.AddWithValue("@SEARCH", "'%" + searchString + "%'");
      ...
  }
  </code></pre>
  
  <p>but this does not work as well. What is going wrong? Any suggestions?</p>