Can someone explain me the parameter RETURN_VALUE ?

Posted by Ronnie Chester Lynwood on Stack Overflow See other posts from Stack Overflow or by Ronnie Chester Lynwood
Published on 2010-04-18T17:36:59Z Indexed on 2010/04/18 17:43 UTC
Read the original article Hit count: 328

Filed under:
|
|

hello. I want to know what does RETURN_VALUE means! I'm stucked at this thing. how to use RETURN_VALUE on MSSQL SP ? thanks..

ASP:

        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)
    '   .Parameters.Append .CreateParameter("@TPinCode", adVarChar, adParamInput, 15,TPinCode)
        .Execute,,adExecuteNoRecords

        RetVal = .Parameters("@retval")
        Ret = Trim(.Parameters("RETURN_VALUE"))

        'Set .ActiveConnection = Nothing
    End With
    Set cmdDB = Nothing

    UTid = RetVal

MSSQL SP:

   CREATE PROCEDURE usp_jaljava_member_select 
@TLoginName varchar(15),
@TPassword varchar(20),
@retval varchar(50) OUTPUT
--@TPinCode varchar(15)
AS

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2000