/****** Object: StoredProcedure [dbo].[AddDesktopModulePermission] Script Date: 07/28/2015 13:26:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AddDesktopModulePermission]
@PortalDesktopModuleID Int, -- not null!
@PermissionId Int, -- not null!
@RoleId Int, -- might be negative for virtual roles
@AllowAccess Bit, -- false: deny, true: grant
@UserId Int, -- -1 is replaced by Null
@CreatedByUserId Int -- -1 is replaced by Null
AS
BEGIN
INSERT INTO dbo.[DesktopModulePermission] (
[PortalDesktopModuleID],
[PermissionID],
[RoleID],
[AllowAccess],
[UserID],
[CreatedByUserID],
[CreatedOnDate],
[LastModifiedByUserID],
[LastModifiedOnDate]
) VALUES (
@PortalDesktopModuleID,
@PermissionID,
@RoleId,
@AllowAccess,
CASE WHEN @UserId = -1 THEN Null ELSE @UserId END,
CASE WHEN @CreatedByUserID = -1 THEN Null ELSE @CreatedByUserID END,
GetDate(),
CASE WHEN @CreatedByUserID = -1 THEN Null ELSE @CreatedByUserID END,
GetDate()
)
SELECT SCOPE_IDENTITY()
END
when I replace @RoleId by a constant value (fore example: 2,) , my install is done but if i use this stored procedure, my module not install. this problem occurred for all modules.