title: get out parameter value of stored procedure in classic asp
body: <p>I am working with classic asp and using stored procedure. I have to get the value of stored procedure out parameter. This is my code </p>
  
  <pre class="lang-vb prettyprint-override"><code>    &lt;% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %&gt;
   &lt;!-- METADATA TYPE="TypeLib" NAME="Microsoft ADO Type Library" UUID="{00000205-0000-0010-8000-00AA006D2EA4}" --&gt;
  &lt;% 
  
  Dim value
      Dim i
  
  set con = Server.CreateObject("ADODB.Connection")
  con.Open  "Provider=SQLOLEDB;Server=aliba\SQLEXPRESS;Database=dummySP;Trusted_Connection=Yes;"      
  Set Comm = Server.CreateObject("ADODB.Command")
  comm.ActiveConnection = con
  comm.CommandText = "sp_dummy"
  'comm.NamedParameters=true
  comm.CommandType = adCmdStoredProc
  comm.Parameters.Append comm.CreateParameter("@weight" , adVarchar,adParamInput, 50, "hello")
  'comm.Parameters.Append comm.CreateParameter("PRODUCT", adVarchar, adParamInput,50, producttype )
  'comm.Parameters.Append comm.CreateParameter("ACCOUNT", adVarchar, adParamInput,100, "" )
  
  
      comm.Parameters.Append comm.CreateParameter("@pris", adVarchar, adParamOutput,50)  'output parameters
      'i=comm.Execute
      comm.Execute
      value=comm.Parameters("@pris").Value
       Response.Write("Value is")
      Response.Write(value)
  </code></pre>
  
  <p>The value of pris is not showing on output.I have no idea what is wrong with this.</p>
  
  <p>I followed this link (<a href="https://stackoverflow.com/questions/10017872/calling-sql-stored-procedure-with-output-parameter-in-vbscript">Calling SQL Stored Procedure with Output Parameter in VBScript</a>) but does not get success </p>
  
  <p>It is giving me following error</p>
  
  <blockquote>
    <p>Value is</p>
    
    <p>Response object error 'ASP 0185 : 8002000e'</p>
    
    <p>Missing Default Property</p>
    
    <p>/StoreProcedure.asp, line 0</p>
    
    <p>A default property was not found for the object.</p>
  </blockquote>
  
  <p>Here is my stored procedure</p>
  
  <pre class="lang-sql prettyprint-override"><code> ALTER procedure [dbo].[sp_dummy]
    @weight nvarchar(50),
    @pris nvarchar(50)= null out
    as
    begin
  
    select @pris = pris from sp_dummy_table where weight= @weight
    end
  </code></pre>