title: Classic ASP - ADO execute Stored Procedure passing in parameters
body: <p>I am needing to pass parameters into a stored procedure with Classic ASP. I do see some people using the Command object and others NOT using it.</p>
  
  <p>My sproc params are like this:</p>
  
  <pre class="lang-sql prettyprint-override"><code>@RECORD_NUMBER decimal(18,0),
  @ErrorType nvarchar(100),
  @INSURANCE_CODE smallint,
  @CompanyId int,
  @INS_ID_NUM nchar(22)   
  </code></pre>
  
  <p>Then I'm trying to do this:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim conn, rsSet,rsString, cmd
  
  Dim RN,ET,IC,CI,IIN
  RN = Request.Form("Record_Number")
  ET = Request.Form("ErrorType")
  IC = Request.Form("INSURANCE_CODE")
  CI = Request.Form("CompanyID")
  IIN = Request.Form("INS_ID_NUM")
  
  set conn = server.CreateObject("adodb.connection")
  set rsSet = Server.CreateObject ("ADODB.Recordset")
  
  
  conn.Open Application("conMestamed_Utilities_ConnectionString")
  rs_string = "apUpdateBill " &amp; RN &amp;",'" &amp;  ET &amp; "'," &amp; IC &amp; "," &amp; CI &amp; ",'" &amp; IIN &amp; "'"
  rsSet.Open rsString, conn, adOpenForwardOnly,, adCmdText
  </code></pre>
  
  <p><strong>(I don't need a Recordset, i'm just trying to get it to send in data)</strong></p>
  
  <blockquote>
    <p>Error:<br>
    ADODB.Recordset error '800a0bb9'<br>
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. </p>
  </blockquote>
  
  <p>I have tried Command stuff and I get "precision" errors
  Do I "have" to use command object?</p>
  
  <p>e.g.</p>
  
  <pre class="lang-vb prettyprint-override"><code>Set cmd = Server.CreateObject("ADODB.Command")
  'Set cmd.ActiveConnection = conn
  'cmd.CommandText = "apUpdateBill"
  'cmd.CommandType = adCmdStoredProc
  'Cmd.Parameters.append Cmd.createParameter("@Record_Number", adDecimal, adParamInput, 18)
  'Cmd.Parameters("@Record_Number").Precision = 0
  'Cmd.Parameters("@Record_Number").value = Request.Form("Record_Number")
  </code></pre>