title: Classic ASP Parameters passing nulls (or empty parms) and ordering
body: <p>I'm using classic ASP and trying to create parameters for a stored procedure call for a procedure that has optional (=NULL) parameters. One of the parameters, @maxrows, is required.</p>
  
  <p>When I try to pass via the following call:</p>
  
  <pre><code>With objCommand
  .ActiveConnection = oConn
  .CommandText = "usp_client_onsite_search"
  .CommandType = adCmdStoredProc
  
  .Parameters.Append .CreateParameter("maxRows",adInteger,adParamInput,4,10)
  .Parameters.Append .CreateParameter("Firstname", adVarchar, adParamInput,50 , vbnull)
  
  End With
  </code></pre>
  
  <p>SQL server shows this "exec usp_client_onsite_search 10,'1'"</p>
  
  <p>In other words, the parameters aren't being passed according to name; they're passed according to order. And some might not be present in each call.</p>