USP_BATCHEVENTSPONSORSHIPBATCHUSERMESSAGE_DELETEBYBATCHID

Auto-generated procedure to handle error/rejection/exception messages for the BATCHEVENTSPONSORSHIP batch message table

Parameters

Parameter Parameter Type Mode Description
@BATCHID uniqueidentifier IN
@CHANGEAGENTID uniqueidentifier IN

Definition

Copy
/*
Generated by Blackbaud AppFx Platform
Date:  11/11/2014 4:08:10 PM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE PROCEDURE dbo.USP_BATCHEVENTSPONSORSHIPBATCHUSERMESSAGE_DELETEBYBATCHID
(
@BATCHID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier
)

as

set nocount on;    

    declare @contextCache varbinary(128);

    if @CHANGEAGENTID is null
        exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;

    set @contextCache = CONTEXT_INFO();

    set CONTEXT_INFO @CHANGEAGENTID;

    delete from dbo.BATCHEVENTSPONSORSHIPBATCHUSERMESSAGE where exists (select BATCHEVENTSPONSORSHIP.ID from dbo.BATCHEVENTSPONSORSHIP where BATCHEVENTSPONSORSHIP.ID = BATCHEVENTSPONSORSHIPBATCHUSERMESSAGE.ID and BATCHID = @BATCHID);

    if not @contextCache is null
        set CONTEXT_INFO @contextCache;

    return 0;