title: Usage of Parameters.Add not working
body: <p>I have a C# program developed in VS 2010 that generates a report by reading parameters supplied from a stored procedure in SQL server. I have two ways of calling the parameters:</p>
  
  <pre><code>command.Parameters.AddWithValue("@SponsorID", strSponsorID);
  </code></pre>
  
  <p>This works perfectly fine with no issue. However when I tried to use a different method like this:</p>
  
  <pre><code>paramFields.Add("SponsorID", (strSponsorID == "" ? "ALL" : strSponsorID));
  </code></pre>
  
  <p>It throws an error claiming: </p>
  
  <blockquote>
    <p>the parameters could not be supplied.</p>
  </blockquote>
  
  <p>Note: <code>Paramfields</code> is a variable that I declared.</p>
  
  <pre><code>SortedList paramFields = new SortedList();
  </code></pre>
  
  <p>May I know what is the possible issue?</p>