Can someone explain me the parameter RETURN_VALUE ?
- by Ronnie Chester Lynwood
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