Stored Procedure Icon dbo.forums_UpdateForum

Stored Procedure Properties

Name Value
Owner dbo
Created 2004-05-31
Startup False
Encrypted False

Creation Options

Name Value
QUOTED_IDENTIFIER OFF
ANSI_NULLS OFF

Parameters

Name DataType Length Type
@ForumID int 4 INPUT
@ForumGroupID int 4 INPUT
@Name nvarchar 200 INPUT
@Description nvarchar 6000 INPUT
@Moderated bit 1 INPUT
@DaysToView int 4 INPUT
@Active bit 1 INPUT

Total: 7 parameter(s)

SQL

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO




CREATE  PROCEDURE forums_UpdateForum
(
	@ForumID	int,
	@ForumGroupID	int,
	@Name		nvarchar(100),
	@Description	nvarchar(3000),
	@Moderated	bit,
	@DaysToView	int,
	@Active	bit
)
 AS
	-- if we are making the forum non-moderated, remove all forum moderators for this forum
	IF @Moderated = 0
		DELETE FROM Moderators
		WHERE ForumID = @ForumID
	-- update the forum information
	UPDATE Forums SET
		Name = @Name,
		ForumGroupID = @ForumGroupID,
		Description = @Description,
		Moderated = @Moderated,
		DaysToView = @DaysToView,
		Active = @Active
	WHERE ForumID = @ForumID
















GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


					

Generated on 26/08/2004 15:05:33 by DataAide.