title: how to get LIKE clause to work in ADO.NET and SQL Server
body: <p>I am doing a really simple query in ASP.NET, but after I inserted the <code>LIKE</code> clause it stops working.</p>
  
  <p>Example:</p>
  
  <pre><code>String sql = " SELECT * 
                   FROM Products 
                  WHERE ID = @MYID 
                    AND Name LIKE '%@MYNAME%' ";
  SqlCommand command = new SqlCommand(sql, cn);
  
  
  command.Parameters.AddWithValue("@MYID", MYID.Text);
  
  command.Parameters.AddWithValue("@MYNAME", MYNAME.Text);
  </code></pre>
  
  <p>If I removed the LIKE it works. Hence I am thinking its to do with the '' quotes?</p>