July 18, 2020 at 6:14 pm
Hi Friends,
I am a Database-Design architect trying to write some stored procedures. I created an SP with one IN parameter and many OUT parameters....I called it from the below calling-code carefully having carefully declared the parameters but still I get this error.. Will be very thankful if somebody can point to the issue and what I missed here....below this calling code , is the stored procedure. Thank You in advance...
Calling Code
Declare @UserName1 nvarchar(20),
@UserID1 int,
@UDesc1 nvarchar(50),
@AuditYN1 nchar(1),
@AuditLvlID1 tinyint,
@UserTypeID1 tinyint,
@UPassword1 nvarchar(20),
@IsEmployee1 nchar(1),
@PEID1 smallint,
@StatusID1 tinyint,
@SavedBy1 nvarchar(20),
@SavedDate1 datetime,
@EditedBy1 nvarchar(20),
@EditedDate1 datetime,
@Edinchar(1)
SET @UserName1 ='SAlice';
EXEC VSSECURITY.Sp_GetVSUser @UserName=@UserName1,@UserID=@UserID1 OUTPUT,@UDesc=@UDesc1 OUTPUT,@AuditYN=@AuditYN1 OUTPUT,@AuditLvlID=@AuditLvlID1 OUTPUT,@UserTypeID=@UserTypeID1 OUTPUT,@UPassword=@UPassword1 OUTPUT,@IsEmployee=@IsEmployee1 OUTPUT,@PEID=@PEID1 OUTPUT,@StatusID=@StatusID1 OUTPUT,@SavedBy=@SavedBy1 OUTPUT,@SavedDate=@SavedDate1 OUTPUT,@EditedBy=@EditedBy1 OUTPUT,@EditedDate=@EditedDate1 OUTPUT,@EditType=@EditType1 OUTPUT
Called-Stored procedure
PROCEDURE [VSSECURITY].[Sp_GetVSUser_OUTparams]
(
@USERNAME NVARCHAR(20),
@userid INT OUT,
@UDESC NVARCHAR(50) OUT,
@AUDITYN NCHAR(1) OUT,
@AUDITLVLID TINYINT OUT,
@USERTYPEID TINYINT OUT,
@UPASSWORD NVARCHAR(20) OUT,
@ISEMPLOYEE NCHAR(1) OUT,
@PEID SMALLINT OUT,
@STATUSID TINYINT OUT,
@SAVEDBY NVARCHAR(20) OUT,
@SAVEDDATE DATETIME OUT,
@EDITEDBY NVARCHAR(20) OUT,
@EDITEDDATE DATETIME OUT,
@EDITTYPE NCHAR(1) OUT
)
AS
BEGIN
SET NOCOUNT ON
Select @userid=UserID,@EDITEDDATE=EditedDate,@EditedBy=EditedBy,@SavedDate=SavedDate,@SavedBy=SavedBy,@StatusID=StatusID,@peid=PEID,@IsEmployee=IsEmployee,@UPassword=UPassword,@Usertypeid=UserTypeID,@AuditYN=AuditYN,@AuditLvlID=AuditLevelID,@UDesc=UDescription from VSSECURITY.TblUserMaster where UserName =@UserName;
END
GO
July 18, 2020 at 6:23 pm
Oh , I figured it out. I was actually calling some other procedure with almost similar name, Caught it...thanks though.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply