title: my sql statement doesn't work in asp.net?
body: <p>I am using asp.NET and I want to make a prepared statement.</p>
  <pre><code>&lt;WebMethod&gt;
  Public Sub fillCriteria2(ByVal critere As String)
          Dim conn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings(&quot;ConnString&quot;).ConnectionString)
          Dim query As String = &quot;SELECT distinct [@critere] From tableName order by [@critere] asc&quot;
          conn.Open()
          Dim cmd As SqlCommand = New SqlCommand(query, conn)
          cmd.Prepare()
          cmd.Parameters.AddWithValue(&quot;@critere&quot;, critere)
          Dim response As SqlDataReader = cmd.ExecuteReader()
  </code></pre>
  <p>But I have this error:</p>
  <pre><code>Invalid column name '@critere'.
  </code></pre>
  <p>I don't know why my parameter is not considered correctly.</p>
  <p>Can you help me please ?</p>