I'm trying to access the return value of this SP. However, the return value seems to always be zero. Unforuntately I'm not allowed to change the SP. Any help would be appreciated. Thanks!
-V
Here is the code...
AseParameter[] parameters = new AseParameter[2];
parameters[0] = RetrievalProcedures.CreateAseParameter("@Entity", AseDbType.NVarChar, 90, ParameterDirection.Input, true, 90, 0, "", DataRowVersion.Current, entity);
parameters[1] = new AseParameter("RETURNVALUE", AseDbType.Integer, 0, ParameterDirection.ReturnValue, true, 10, 0, "", DataRowVersion.Current, returnValue);
int toReturn = adapter.CallActionStoredProcedure("resource.dbo.PCC_GenerateId;1", parameters);
returnValue = (int)parameters[1].Value;
return toReturn;
Here is the SP...
CREATE PROCEDURE MyProc @Entity nvarchar(30)
AS
BEGIN
DECLARE @Id int,
@ReservedID int
[Some logic here]
SELECT @Id AS id
ENDRETURN:
RETURN 0
END