hi I thought I followed to the "T" how to return a value from stored produre but an empty value is returned.
Any help much appreciated:
ASP:
objCM.ActiveConnection = Application("strConn"
objCM.CommandText = "CS_insertUsers"
objCM.CommandType = adCmdStoredProc
objCM.Parameters.Append objCM.CreateParameter("return", adInteger, adParamReturnValue, 4)
objCM.Parameters.Append objCM.CreateParameter("@ID", adInteger, adParamInput, 4, ID )
IsValid = objCM.Parameters("return".Value
objCM.Execute
Response.write "IsValid Type " & VarType(IsValid) & " IsValid " & IsValid & " here"
SP:
CREATE PROCEDURE CS_insertUsers
@ID int
AS
if exists(Select * From CS_users WHERE id = @ID)
return(1)
else
return(0)
GO
Any help much appreciated:
ASP:
objCM.ActiveConnection = Application("strConn"
objCM.CommandText = "CS_insertUsers"
objCM.CommandType = adCmdStoredProc
objCM.Parameters.Append objCM.CreateParameter("return", adInteger, adParamReturnValue, 4)
objCM.Parameters.Append objCM.CreateParameter("@ID", adInteger, adParamInput, 4, ID )
IsValid = objCM.Parameters("return".Value
objCM.Execute
Response.write "IsValid Type " & VarType(IsValid) & " IsValid " & IsValid & " here"
SP:
CREATE PROCEDURE CS_insertUsers
@ID int
AS
if exists(Select * From CS_users WHERE id = @ID)
return(1)
else
return(0)
GO