Stored Procedure Properties
| Name | Value |
|---|---|
| Owner | dbo |
| Created | 2004-05-31 |
| Startup | False |
| Encrypted | False |
Creation Options
| Name | Value |
|---|---|
| QUOTED_IDENTIFIER | ON |
| ANSI_NULLS | ON |
Parameters
| Name | DataType | Length | Type |
|---|---|---|---|
| @PostID | int | 4 | INPUT |
| @Subject | nvarchar | 512 | INPUT |
| @Body | ntext | 16 | INPUT |
| @IsLocked | bit | 1 | INPUT |
| @EditedBy | nvarchar | 100 | INPUT |
Total: 5 parameter(s)
SQL
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE forums_UpdatePost ( @PostID int, @Subject nvarchar(256), @Body ntext, @IsLocked bit, @EditedBy nvarchar(50) ) AS -- this sproc updates a post (called from the moderate/admin page) UPDATE Posts SET Subject = @Subject, Body = @Body, IsLocked = @IsLocked WHERE PostID = @PostID -- We want to track what happened INSERT INTO ModerationAudit VALUES (GetDate(), @PostID, @EditedBy, 2, null) GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO