USP_RECORDOPERATION_QUERYWITHDELETEERROR

Parameters

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

Definition

Copy


create procedure dbo.USP_RECORDOPERATION_QUERYWITHDELETEERROR
(
    @ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier
)
as begin
    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.QUERYWITHDELETEERROR where QUERYID=@ID;

    /* reset CONTEXT_INFO to previous value */
    if not @contextCache is null
        set CONTEXT_INFO @contextCache

    return 0;

end