Stored Procedures [dbo].[ChangeStateOfDataSource]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@ItemIDuniqueidentifier16
@Enablebit1
Permissions
TypeActionOwning Principal
GrantExecuteRSExecRole
SQL Script
CREATE PROCEDURE [dbo].[ChangeStateOfDataSource]
@ItemID [uniqueidentifier],
@Enable bit
AS
IF @Enable != 0 BEGIN
   UPDATE [DataSource]
      SET
         [Flags] = [Flags] | 1
   WHERE [ItemID] = @ItemID
END
ELSE
BEGIN
   UPDATE [DataSource]
      SET
         [Flags] = [Flags] & 0x7FFFFFFE
   WHERE [ItemID] = @ItemID
END

GO
GRANT EXECUTE ON  [dbo].[ChangeStateOfDataSource] TO [RSExecRole]
GO
Uses