title: C# SQL Top as parameter
body: <p>Trying to parameterize the value of TOP in my sql statement. </p>
  
  <pre><code>SELECT TOP @topparam * from table1
  
  command.Parameters.Add("@topparam",SqlDbType.VarChar, 10).Value = somevalue.ToString();
  </code></pre>
  
  <p>This doesn't seem to work. Anyone have any suggestions?<br>
  Just to clarify, I don't want to use stored procedures. </p>