USP_UPDATEMULTIPLECONSTITUENTSFROMMFOBATCHBATCHSYSTEMMESSAGE_DELETEBYID_WITHCHANGEAGENTID
Used to delete a row from the UPDATEMULTIPLECONSTITUENTSFROMMFOBATCHBATCHSYSTEMMESSAGE table.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The ID of the record being deleted. |
@CHANGEAGENTID | uniqueidentifier | IN | The ID of the change agent invoking the delete. |
Definition
Copy
/*
Generated by Blackbaud AppFx Platform
Date: 8/17/2011 2:20:01 PM
Assembly Version: Blackbaud.AppFx.Platform.SqlClr, Version=2.91.1535.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE PROCEDURE dbo.USP_UPDATEMULTIPLECONSTITUENTSFROMMFOBATCHBATCHSYSTEMMESSAGE_DELETEBYID_WITHCHANGEAGENTID(@ID UNIQUEIDENTIFIER,@CHANGEAGENTID UNIQUEIDENTIFIER=NULL)
AS
/*
Sets Context Info to the CHANGEAGENTID
Deletes a row in the UPDATEMULTIPLECONSTITUENTSFROMMFOBATCHBATCHSYSTEMMESSAGE table with the given ID
Resets Context info to the previous value
The Context Info will be used by delete triggers to log the AUDITCHANGEAGENTID
as the supplied @CHANGEAGENTID rather than the default change agent id.
*/
set nocount on;
declare @e int;
declare @contextCache varbinary(128);
/* cache current context information */
set @contextCache = CONTEXT_INFO();
/* set CONTEXT_INFO to @CHANGEAGENTID */
if not @CHANGEAGENTID is null
set CONTEXT_INFO @CHANGEAGENTID
delete from dbo.UPDATEMULTIPLECONSTITUENTSFROMMFOBATCHBATCHSYSTEMMESSAGE where ID=@ID;
/* reset CONTEXT_INFO to previous value */
if not @contextCache is null
set CONTEXT_INFO @contextCache
select @e=@@error;
if @e<>0 return -456; --always return non-zero sp result if an error occurs
return 0;