title: Can someone explain me the parameter RETURN_VALUE?
body: <p>I want to know what does RETURN_VALUE mean! I'm stuck at this thing. How to use RETURN_VALUE in a SQL Server stored procedure? thanks..</p>
  
  <p>ASP:</p>
  
  <pre><code>Set cmdDB = Server.CreateObject("ADODB.Command")
  With cmdDB
     .ActiveConnection = ADOConM
     .CommandText = "usp_jaljava_member_select"
     .CommandType = adCmdStoredProc
     .Parameters.Append .CreateParameter("RETURN_VALUE", adInteger, adParamReturnValue, 0)
     .Parameters.Append .CreateParameter("@TLoginName", adVarChar, adParamInput, 15, lcase(TLoginName))
     .Parameters.Append .CreateParameter("@TPassword", adVarChar, adParamInput, 20, TPassword)
     .Parameters.Append .CreateParameter("@retval", adVarChar, adParamOutput, 50)
  </code></pre>
  
  <p>'   .Parameters.Append .CreateParameter("@TPinCode", adVarChar, adParamInput, 15,TPinCode)
         .Execute,,adExecuteNoRecords</p>
  
  <pre><code>   RetVal = .Parameters("@retval")
     Ret = Trim(.Parameters("RETURN_VALUE"))
  
     'Set .ActiveConnection = Nothing
  End With
  Set cmdDB = Nothing
  
  UTid = RetVal
  </code></pre>
  
  <p>SQL Server stored procedure:</p>
  
  <pre><code>CREATE PROCEDURE usp_jaljava_member_select 
     @TLoginName varchar(15),
     @TPassword varchar(20),
     @retval varchar(50) OUTPUT
     --@TPinCode varchar(15)
  AS
  </code></pre>