title: Error 42000 Must Declare the scalar variable "@ID"
body: <p>Error while setting parameter in the sql query</p>
  
  <pre><code>string cs = ConfigurationManager.ConnectionStrings["conString"].ConnectionString.ToString();
  OdbcConnection con = new OdbcConnection(cs);
  
  
  OdbcCommand cmd = new OdbcCommand("select CustomerID, LastName, FirstName from Customers.Customer.Customer_Details where CustomerID = @ID", con);
  con.Open();
  cmd.Parameters.AddWithValue("@ID", Convert.ToInt32(txtID.Text));
  OdbcDataReader reader = cmd.ExecuteReader();
  </code></pre>